You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createProgram fails with internal error when using @typescript/vfs and setting compiler option target to ES2021. This issue only happens for ES2021, all other targets work fine.
/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:10460
scan: while (pos >= 0 && pos < text.length) {
^
TypeError: Cannot read property 'length' of undefined
at iterateCommentRanges (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:10460:45)
at reduceEachLeadingCommentRange (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:10551:16)
at Object.getLeadingCommentRanges (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:10566:16)
at Object.getJSDocCommentRanges (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:15263:16)
at addJSDocComment (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:30878:42)
at parseSourceFileWorker (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:30851:34)
at Object.parseSourceFile (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:30683:26)
at Object.createSourceFile (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:30481:29)
at Object.getSourceFile (/local/home/dppilche/typescript-vfs-bug/node_modules/@typescript/vfs/src/index.ts:504:16)
at findSourceFileWorker (/local/home/dppilche/typescript-vfs-bug/node_modules/typescript/lib/typescript.js:115369:29)
🙂 Expected behavior
createProgram does not crash.
The text was updated successfully, but these errors were encountered:
Bug Report
createProgram
fails with internal error when using @typescript/vfs and setting compiler option target to ES2021. This issue only happens forES2021
, all other targets work fine.🔎 Search Terms
ES2021, createProgram, @typescript/vfs, vfs
🕗 Version & Regression Information
Full version information:
⏯ Playground Link
Reproduction requires import of
typescript
and@typescript/vfs
. Playground doesn't appear to support this.💻 Code
🙁 Actual behavior
Above snippet fails with following error:
🙂 Expected behavior
createProgram
does not crash.The text was updated successfully, but these errors were encountered: