aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib.ts b/lib.ts
index 281e9c9..12fe6b2 100644
--- a/lib.ts
+++ b/lib.ts
@@ -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
}