From 4bff9a2fe3565865653e66606fdd81daf1fe748e Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Tue, 28 Sep 2021 01:06:38 +0200 Subject: [PATCH] Removed TransitTypes type in PKPass for the one in Schemas --- src/PKPass.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/PKPass.ts b/src/PKPass.ts index dd8d9c0..9f7e5c0 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -22,12 +22,6 @@ interface NamedBuffers { [key: string]: Buffer; } -type TransitTypes = `PKTransitType${ - | "Air" - | "Boat" - | "Bus" - | "Generic" - | "Train"}`; const LOCALIZED_FILE_REGEX_BASE = "(?[a-zA-Z-]{2,}).lproj/"; @@ -170,7 +164,7 @@ export default class PKPass extends Bundle { * @param value */ - public set transitType(value: TransitTypes) { + public set transitType(value: Schemas.TransitType) { if (!this[propsSymbol].boardingPass) { throw new TypeError( "Cannot set transitType on a pass with type different from 'boardingPass'.", @@ -196,7 +190,7 @@ export default class PKPass extends Bundle { * from pass props */ - public get transitType(): TransitTypes { + public get transitType() { return this[propsSymbol]["boardingPass"]?.transitType; }