Closed
Description
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:
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)