Comments (10)
This is a misconfiguration. TypeScript won't automatically pick up two files with the same extension via include
(this is intentional), so index.ts
is part of your project and index.tsx
isn't (thus index.tsx
is in the inferred project which doesn't have any of the necessary jsx
settings). You'll need to put index.tsx
in the files array or otherwise modify your config if you want to do this.
from typescript.
I figured out.
VSCode is unable to differentiate between index.ts and index.tsx. Changing index.ts to anything else made the problem go away.
Gonna leave this issue open because imo this is a bug.
from typescript.
Can you provide sample code/repro steps to help us investigate?
from typescript.
It looks like this is a question rather than a bug report. This issue tracker is for tracking bugs and active work on TypeScript itself, rather than a general forum for programmers using TypeScript to get help or ask questions.
You can ask questions on sites like Stack Overflow. We are not able to provide one-on-one support on the issue tracker. Please read the issue template carefully - it has important information on what kinds of reports can be acted on here, as well as links to useful TypeScript resources. Thanks!
from typescript.
It looks like this is a question rather than a bug report. This issue tracker is for tracking bugs and active work on TypeScript itself, rather than a general forum for programmers using TypeScript to get help or ask questions.
You can ask questions on sites like Stack Overflow. We are not able to provide one-on-one support on the issue tracker. Please read the issue template carefully - it has important information on what kinds of reports can be acted on here, as well as links to useful TypeScript resources. Thanks!
Respectfully i disagree, this is not a question, this is a issue. I'll provide an sample repository.
from typescript.
If it’s a bug, you need to use the bug report template.
from typescript.
@fatcerberus
@iisaduan
@RyanCavanaugh
Here:
https://github.com/mrVin99/vscode-issue-58844
Unless somehow its a problem within my vscode setup, you should be able to see. Install the dependencies (pnpm or npm) and just go to index.tsx, it should display the error msg. Change the index.ts to anything you want .ts, the error msg will dissapear.
from typescript.
@fatcerberus @iisaduan @RyanCavanaugh
Here:
https://github.com/mrVin99/vscode-issue-58844
Unless somehow its a problem within my vscode setup, you should be able to see. Install the dependencies (pnpm or npm) and just go to index.tsx, it should display the error msg. Change the index.ts to anything you want .ts, the error msg will dissapear.
For reference, this is not a problem with intellij idea. So for this reason i believe this to be a bug.
from typescript.
If it’s a bug, you need to use the bug report template.
Sorry about, should i create a new issue report or is the repository and explanation above good enough?
from typescript.
Didn't know it was intentional, since it worked on intellij. I'll look this up, thanks for the help!
from typescript.
Related Issues (20)
- Incorrect Error Message: "Cannot assign to 'name' because it is a constant" Instead of "Identifier 'name' is not defined" for Undefined Identifier Assignment HOT 2
- Generic with extends yields to different type than directly specifying it HOT 5
- Instantiation expressions don't reject incompatible signatures in situations with mixed call and construct signatures HOT 1
- Parameters of overridden methods are made implicit any when using JSDoc `@override` HOT 13
- Auto complete and auto import not work (ReactJS, ChakraUI)
- 'TypeScript and JavaScript Language Features' Formatter hangs HOT 3
- Mapped type of a conditional type unexpectedly fails inference
- Returing a generic argument from a function allows returning a wrong type HOT 1
- Module resolution behaves differently when typeRoots is specified
- Ability to type check setters in interface implementations HOT 2
- ⚡ Performance: Project service spends excess time cleaning client files when called synchronously HOT 2
- ⚡ Performance: Project service doesn't cache all fs.statSync HOT 18
- jsxRuntime pragma does not work
- ThisType doesn't enforce type-checking `Object.prototype.call` HOT 2
- ⚡ Performance: Project service doesn't cache all fs.realpath HOT 1
- `null` prop with `satisfies`, `strictNullChecks: false` + `noImplicitAny: true` gives any report HOT 4
- Debugging failure caused by lack of backtick(`)
- [proposal] Non widened string values should be valid enum values, like widened string values HOT 1
- 'Could not find source file' with Vue plugin when creating new files and using VS Code's file watcher HOT 7
- Contextual parameters inferred from overloads improvements
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 typescript.