diff options
-rw-r--r-- | lib.ts | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -112,10 +112,19 @@ export default class UICVehicle<Operator extends string | null, Country extends return this.operator; } protected vehicleType: `${Digit}${Digit}`; + public getVehicleType(): `${Digit}${Digit}` { + return this.vehicleType + } /** Only available if Country is null */ protected countryCode: Country extends null ? `${Digit}${Digit}` : undefined; protected vehicleFamily: `${Digit}${Digit}${Digit}${Digit}`; + public getVehicleFamily(): `${Digit}${Digit}${Digit}${Digit}` { + return this.vehicleFamily + } protected serialNumber: `${Digit}${Digit}${Digit}`; + public getSerialNumber(): `${Digit}${Digit}${Digit}` { + return this.serialNumber + } public get selfCheckDigit(): Digit { return UICVehicle.getSelfCheckDigit(this.vehicleType + (this.country?.uicIdentifier ?? this.countryCode) + this.vehicleFamily + this.serialNumber).toString() as Digit } |