mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 16:25:21 +00:00
Fixed accessors
This commit is contained in:
@@ -21,7 +21,7 @@ export default class Bundle {
|
|||||||
private [filesSymbol]: { [key: string]: Buffer } = {};
|
private [filesSymbol]: { [key: string]: Buffer } = {};
|
||||||
private [mimeTypeSymbol]: string;
|
private [mimeTypeSymbol]: string;
|
||||||
|
|
||||||
constructor(mimeType: `${Mime.type}/${Mime.subtype}`) {
|
public constructor(mimeType: `${Mime.type}/${Mime.subtype}`) {
|
||||||
if (!mimeType) {
|
if (!mimeType) {
|
||||||
throw new Error(Messages.BUNDLE.MIME_TYPE_MISSING);
|
throw new Error(Messages.BUNDLE.MIME_TYPE_MISSING);
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ export default class Bundle {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static freezable(
|
public static freezable(
|
||||||
mimeType: `${Mime.type}/${Mime.subtype}`,
|
mimeType: `${Mime.type}/${Mime.subtype}`,
|
||||||
): [Bundle, Function] {
|
): [Bundle, Function] {
|
||||||
const bundle = new Bundle(mimeType);
|
const bundle = new Bundle(mimeType);
|
||||||
@@ -70,7 +70,7 @@ export default class Bundle {
|
|||||||
* can be added any further.
|
* can be added any further.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected [freezeSymbol]() {
|
private [freezeSymbol]() {
|
||||||
if (this.isFrozen) {
|
if (this.isFrozen) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default class PKPass extends Bundle {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static async from<S extends PKPass | Schemas.Template>(
|
public static async from<S extends PKPass | Schemas.Template>(
|
||||||
source: S,
|
source: S,
|
||||||
props?: Schemas.OverridablePassProps,
|
props?: Schemas.OverridablePassProps,
|
||||||
): Promise<PKPass> {
|
): Promise<PKPass> {
|
||||||
@@ -111,7 +111,7 @@ export default class PKPass extends Bundle {
|
|||||||
* @param passes
|
* @param passes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static pack(...passes: PKPass[]): Bundle {
|
public static pack(...passes: PKPass[]): Bundle {
|
||||||
const [bundle, freezeBundle] = Bundle.freezable(
|
const [bundle, freezeBundle] = Bundle.freezable(
|
||||||
"application/vnd.apple.pkpasses",
|
"application/vnd.apple.pkpasses",
|
||||||
);
|
);
|
||||||
@@ -135,7 +135,7 @@ export default class PKPass extends Bundle {
|
|||||||
// *** INSTANCE *** //
|
// *** INSTANCE *** //
|
||||||
// **************** //
|
// **************** //
|
||||||
|
|
||||||
constructor(
|
public constructor(
|
||||||
buffers?: Schemas.FileBuffers,
|
buffers?: Schemas.FileBuffers,
|
||||||
certificates?: Schemas.CertificatesSchema,
|
certificates?: Schemas.CertificatesSchema,
|
||||||
props?: Schemas.OverridablePassProps,
|
props?: Schemas.OverridablePassProps,
|
||||||
|
|||||||
Reference in New Issue
Block a user