Removed TransitTypes type in PKPass for the one in Schemas

This commit is contained in:
Alexander Cerutti
2021-09-28 01:06:38 +02:00
parent 945a653f22
commit 4bff9a2fe3

View File

@@ -22,12 +22,6 @@ interface NamedBuffers {
[key: string]: Buffer;
}
type TransitTypes = `PKTransitType${
| "Air"
| "Boat"
| "Bus"
| "Generic"
| "Train"}`;
const LOCALIZED_FILE_REGEX_BASE = "(?<lang>[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;
}