Closed taxilian closed 1 month ago
Digging into the source code this looks like typescript is actually catching a real bug. The line is:
this.chart.update(this.entriesToLineChartData(this.entries ?? []));
entriesToLineChartData takes a ChartEntry
and immediately tries to use entry.summary?.labels?.length
– since summary won't exist on an empty array this will technically work, but it's confusing at best. It would probably make more sense to have entriesToLineChartData aware that entry
could be undefined, then always just pass in this.entries
– which should also know that it could possibly be undefined.
FWIW my tsconfig parameters are:
{
"compilerOptions": {
"allowJs": true,
"module": "CommonJS",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "ES2022",
"useDefineForClassFields": false,
"strict": false,
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"resolveJsonModule": true,
"strictPropertyInitialization": false,
"skipLibCheck": true
},
}
Which plugin/repository is the issue about? metrics
Describe the bug When trying to build the admin UI I get:
To Reproduce Steps to reproduce the behavior:
Using Vendure 3.0.5 and typescript@5.3.3 trying to compile a custom admin UI.
Expected behavior No errors
Screenshots
Environment
typescript 5.3.3
Additional context
It is possible that there is something unusual about how I'm building my custom UI, but everything else has been working.