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
cd tests && npm init -y && npm install --save-dev @types/react && cd ../
./node_modules/.bin/tsc --init
./node_modules/.bin/tsc --noEmit
Expected behavior:
Compiled without errors
Actual behavior:
Error: Debug Failure. False expression.
at mergeSymbol (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:24252:26)
at E:\git\ts-bug\node_modules\typescript\lib\tsc.js:24344:49
at Map.forEach (<anonymous>)
at mergeSymbolTable (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:24343:20)
at mergeModuleAugmentation (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:24354:17)
at initializeTypeChecker (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:45114:25)
at Object.createTypeChecker (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:24102:9)
at getDiagnosticsProducingTypeChecker (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:66941:93)
at Object.getGlobalDiagnostics (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:67286:53)
at Object.emitFilesAndReportErrors (E:\git\ts-bug\node_modules\typescript\lib\tsc.js:69563:46)
The text was updated successfully, but these errors were encountered:
Probably it can be useful. I guess that the reason of this is in initializeTypeChecker function - it walks through all source files and pushes augmentation to an array (via (augmentations || (augmentations = [])).push(file.moduleAugmentations);), but here we can have source file with redirectInfo, and it is possible that we should skip it in the loop (but I am not sure).
TypeScript Version: 3.0.0-dev.20180703
Search Terms: Global augmentation
Code
mkdir src && echo "import * as React from 'react';console.log(React);" > src/index.ts
mkdir tests && echo "import * as React from 'react';console.log(React);" > tests/index.ts
npm init -y && npm install --save-dev typescript@next @types/react
cd tests && npm init -y && npm install --save-dev @types/react && cd ../
./node_modules/.bin/tsc --init
./node_modules/.bin/tsc --noEmit
Expected behavior:
Compiled without errors
Actual behavior:
The text was updated successfully, but these errors were encountered: