Here I have this line:
const _quantity = startPaymentFrontend?.products[productSlug]?.invoiceData?.[key2]
This here
startPaymentFrontend?.products[productSlug]
is a StartPaymentProduct
export interface StartPaymentProduct { pricingOptionId?: string passTypeId?: string quantity: number eventTimes?: { [eventTimeId: string]: StartPaymentProductEventTime } invoiceItems?: { [key: string]: number } teamSlug: string}
Even developer environment recognize it.
which does not have invoiceData
only invoiceItems
.
Why running yarn build
does not raise error on it?
This here is the tsconfig.json
{"compilerOptions": {"target": "es5","lib": ["dom", "dom.iterable", "esnext"],"allowJs": true,"skipLibCheck": true,"strict": true,"forceConsistentCasingInFileNames": true,"noEmit": false,"esModuleInterop": true,"module": "esnext","moduleResolution": "node","resolveJsonModule": true,"isolatedModules": true,"jsx": "preserve","sourceMap": true,"importHelpers": true,"outDir": "./built" },"include": ["app/**/*", "index.d.ts", "index2.d.ts"],"exclude": ["node_modules"]}
How can I force to raise error in those cases?!