Closed falsandtru closed 5 years ago
FWIW, here's the full stack trace I'm seeing:
TypeError: Cannot read property '0' of undefined
at checkExportSpecifier (/tmp/xx/node_modules/typescript/lib/tsc.js:52303:124)
at Object.forEach (/tmp/xx/node_modules/typescript/lib/tsc.js:225:30)
at checkExportDeclaration (/tmp/xx/node_modules/typescript/lib/tsc.js:52269:24)
at checkSourceElementWorker (/tmp/xx/node_modules/typescript/lib/tsc.js:52569:28)
at checkSourceElement (/tmp/xx/node_modules/typescript/lib/tsc.js:52408:17)
at Object.forEach (/tmp/xx/node_modules/typescript/lib/tsc.js:225:30)
at checkBlock (/tmp/xx/node_modules/typescript/lib/tsc.js:50207:20)
at checkSourceElementWorker (/tmp/xx/node_modules/typescript/lib/tsc.js:52518:28)
at checkSourceElement (/tmp/xx/node_modules/typescript/lib/tsc.js:52408:17)
at checkModuleDeclaration (/tmp/xx/node_modules/typescript/lib/tsc.js:52064:17)
@falsandtru can you explain why this should pass? The errors I get after fixing the crash look correct:
welove.ts:1:9 - error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.
1 declare global {
~~~~~~
welove.ts:2:14 - error TS2661: Cannot export 'globalThis'. Only local declarations can be exported from a module.
2 export { globalThis as global }
~~~~~~~~~~
Found 2 errors.
See also #33756
Looks like correct. I'll file bugs again if unfixed bugs exist.
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
Expected behavior:
pass
Actual behavior:
Playground Link:
Related Issues: