Types and automatic improvements

This commit is contained in:
Alexander Cerutti
2020-09-05 23:43:28 +02:00
parent fee3383ffa
commit bca5d666bc

View File

@@ -75,7 +75,7 @@ export class Pass {
// Parsing and validating pass.json keys // Parsing and validating pass.json keys
const passCoreKeys = Object.keys(this.passCore) as (keyof schema.ValidPass)[]; const passCoreKeys = Object.keys(this.passCore) as (keyof schema.ValidPass)[];
const validatedPassKeys = passCoreKeys.reduce((acc, current) => { const validatedPassKeys = passCoreKeys.reduce<schema.ValidPass>((acc, current) => {
if (this.type === current) { if (this.type === current) {
// We want to exclude type keys (eventTicket, // We want to exclude type keys (eventTicket,
// boardingPass, ecc.) and their content // boardingPass, ecc.) and their content