Comments (8)
This suppressImplicitAnyIndexErrors
shouldn't probably be true
by default. Why should it be? It suppresses quite bad errors, i.e.:
const key = 'someString';
const value: boolean = false;
const result = value[key]; // would be highlighted if `suppressImplicitAnyIndexErrors` weren't true
from create-react-app-typescript.
Hm something else is wrong, the tsconfig.json
is read (if I break it things won't compile)
from create-react-app-typescript.
Looks like it works if I directly invoke tsc:
~/GitHub/my-app$ ./node_modules/typescript/bin/tsc --noImplicitAny --jsx react src/App.tsx
src/App.tsx(8,11): error TS7017: Element implicitly has an 'any' type because type 'X' has no index signature.
from create-react-app-typescript.
Any update on this? I'm surprised that nobody else using this package has reported the same issue.
from create-react-app-typescript.
@wmonk I just tried the repro steps and still doesn't work for me. Does it work for you?
from create-react-app-typescript.
Looks like the generated tsconfig.json is explicitly suppressing that error with
"suppressImplicitAnyIndexErrors": true,
from create-react-app-typescript.
Oh I'm blind.. yes you're right, that explains everything. Thank you @tko!
from create-react-app-typescript.
Why maintain suppressImplicitAnyIndexErrors
set to true
by default? Could anyone point me to some resource on the reasoning behind it?
In what case is it better to suppress this kind of warning?
from create-react-app-typescript.
Related Issues (20)
- Browserlist error
- CRA 2.0 HOT 31
- Include nodejs v8 for for Travis CI build
- Remove dependency on babel HOT 2
- Using jest-extended? HOT 1
- Husky hooks not working HOT 1
- Update webpack-dev-server HOT 10
- Add documentation detailing differences between CRA 2.0 and CRA-TS HOT 10
- Source Maps don't work for `js` or `jsx` files in live dev mode.
- Version 4.0.8: Internet Explorer no working anymore HOT 2
- Build process is almost 20 minutes long HOT 1
- postcss support? HOT 1
- Why is Jest's version hard coded to "20.0.4"? HOT 1
- Jest doesn't work when I add lint-staged
- Maintenance
- Tslint rules are barriers to entry HOT 2
- [Help] Compatibility IE + Firefox old versions problems
- Are 4.X.X versions are legit? HOT 1
- Jest doesn't resolve absolute paths from tsconfig HOT 1
- npm start dont work on freeBSD
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-react-app-typescript.