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
{{ message }}
Repository navigation
Typescript does not import JSON and throws Type error #5613
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 70.0.3538.77
Firefox: 63.0
Safari: 12.0
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to Reproduce
add a json file to project
add import json from './test.json'; to another file
start compilation
Expected Behavior
Json file is imported into app and become JS object - which works in a refular .js CRA project.
Actual Behavior
Type error: Cannot compile namespaces when the '--isolatedModules' flag is provided. TS1208
Activity
Timer commentedon Oct 29, 2018
/cc @brunolemos
Ignore json files from TypeScript type checking
Ignore json files from TypeScript type checking (react#5614)
Ignore json files from TypeScript type checking (react#5614)
Ignore json files from TypeScript type checking (react#5614)
Ignore json files from TypeScript type checking (react#5614)
Fork update (#6)