aboutsummaryrefslogtreecommitdiffstats
path: root/lib.ts
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-07-06 06:32:33 +0200
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-07-06 06:32:33 +0200
commitbc698228440e2c7558cb46238368e2f0fafb154c (patch)
treedaa393c0b7584516b3476fa2f8fb9b6193d34ce9 /lib.ts
parent768ab341855e215ca8085cfdcb2d812419c17fdb (diff)
downloaduic-parse-bc698228440e2c7558cb46238368e2f0fafb154c.tar.gz
uic-parse-bc698228440e2c7558cb46238368e2f0fafb154c.tar.bz2
uic-parse-bc698228440e2c7558cb46238368e2f0fafb154c.tar.lz
uic-parse-bc698228440e2c7558cb46238368e2f0fafb154c.zip

feat: getter functions because i have my reasons fuck you

Diffstat (limited to 'lib.ts')
-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
}