Added upcomingPassInformation getter

This commit is contained in:
Alexander Cerutti
2025-09-17 22:51:28 +02:00
parent 4dec0d9b05
commit 56572214c6
2 changed files with 14 additions and 2 deletions

View File

@@ -276,7 +276,7 @@ export default class PKPass extends Bundle {
if (this.type !== "eventTicket") {
throw new TypeError(
Messages.UPCOMING_PASS_INFORMATION.UNEXPECTED_PASS_TYPE,
Messages.UPCOMING_PASS_INFORMATION.UNEXPECTED_PASS_TYPE_SET,
);
}
@@ -297,6 +297,16 @@ export default class PKPass extends Bundle {
this[propsSymbol].upcomingPassInformation = value;
}
public get upcomingPassInformation(): Schemas.UpcomingPassInformationEntry[] {
if (this.type !== "eventTicket") {
throw new TypeError(
Messages.UPCOMING_PASS_INFORMATION.UNEXPECTED_PASS_TYPE_GET,
);
}
return this[propsSymbol].upcomingPassInformation || [];
}
/**
* Allows setting a transitType property
* for a boardingPass.