Closed ryan-mars closed 3 years ago
Looks like a problem with array serialization. https://github.com/punchcard/punchcard/blob/dbbd1282a7733e6886571f5f6e537168af95ff40/packages/%40punchcard/shape-json/src/json.ts#L217
We have a test though https://github.com/punchcard/punchcard/blob/dbbd1282a7733e6886571f5f6e537168af95ff40/packages/%40punchcard/shape-json/test/json.test.ts#L35
I’ll take a look - thanks for the repro
tsconfig was the offender
👇🏻 works
{
"compilerOptions": {
"target": "es2018",
"lib": [
"es2019",
"es5",
"es6",
"esnext.asynciterable",
"dom"
],
"downlevelIteration": true,
"module": "commonjs",
"strict": true,
"strictPropertyInitialization": false,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"forceConsistentCasingInFileNames": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true
},
"exclude": [
"node_modules",
"build"
]
}
To clarify - the target ES version was ES5 and punchcard is ES2018.
Given a file:
Compile and run produces an error: