From 78baf787503372f555e7b82df6b6b741ff3c921d Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Fri, 6 Dec 2019 00:23:55 +0100 Subject: [PATCH] Small improvements --- src/pass.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pass.ts b/src/pass.ts index 12176cc..c4c8c64 100644 --- a/src/pass.ts +++ b/src/pass.ts @@ -38,9 +38,9 @@ export class Pass { public auxiliaryFields: FieldsArray; public backFields: FieldsArray; - Certificates: schema.FinalCertificates; + private Certificates: schema.FinalCertificates; + private [transitType]: string = ""; l10nTranslations: { [key: string]: { [key: string]: string } } = {}; - [transitType]: string = ""; constructor(options: schema.PassInstance) { if (!schema.isValid(options, "instance")) { @@ -425,7 +425,7 @@ export class Pass { */ barcode(chosenFormat: schema.BarcodeFormat | null): this { - let { barcodes } = this[passProps]; + const { barcodes } = this[passProps]; if (chosenFormat === null) { delete this[passProps]["barcode"]; @@ -568,7 +568,7 @@ export class Pass { */ private _patch(passCoreBuffer: Buffer): Buffer { - let passFile = JSON.parse(passCoreBuffer.toString()); + const passFile = JSON.parse(passCoreBuffer.toString()) as schema.ValidPass; if (Object.keys(this[passProps]).length) { /*