Closed wpyoga closed 1 year ago
Thanks for pointing this out. Do you know how we can reproduce this without VS Code? We should catch this kind of error in the CI if possible. I ran tsc 4.6.4 with the --strict
flag on this file but didn't get any error.
Unfortunately I haven't been able to reproduce this without VS Code. I have tried eslint-typescript
and the now-deprecated tslint
, but haven't been able to get it to show this error. Someone more knowledgeable should step in.
Running eslint does show quite a large number of other errors though...
$ npx eslint .
...
✖ 107 problems (38 errors, 69 warnings)
2 errors and 0 warnings potentially fixable with the `--fix` option.
Ok, thanks for looking into it. I will open another issue to address the eslint warnings.
In test/primitive_parser.ts:125
There is an error if we open the file in VS Code:
This is because on line 120:
The type of
bytes
is inferred asnever[]
. This patch solves the problem by explicitly initializingbytes
to an emptynumber
array.