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)
- URLSearchParams not accept number as a value HOT 3
- Passed generic not giving exact return type in callbacks HOT 7
- importHelpers not respected when exporting defaults HOT 3
- `import.meta.resolve` is missing in `lib.dom.d.ts` HOT 1
- Nested generic calls don't inherit outer inferences when their return types are intersections containing functions
- DOM.AsyncIterable not recognized as a valid lib HOT 5
- Type is not checked when spreading a typed object into another typed object HOT 4
- DecoratorsOf<TClass, TFieldName> - Expose decorators to the type system HOT 6
- 5.4.5 nuget package is missing. HOT 3
- Default imports don't work with module resolution node16 HOT 6
- Type guards do not flow when used as callbacks HOT 2
- Allow consumers of Compiler API to override getDirectoryToWatchFailedLookupLocation HOT 3
- Map containing array with strict nullable doesn't work right HOT 4
- Inverted union type narrowing was broken in 4.9 HOT 2
- [nightly][performance] 97% of time spent reading type dependencies when --noCheck and --isolatedDeclarations is enabled HOT 14
- Narrowing subtypes by enum values does not work HOT 4
- Add k command-line flag to allow user specify the module option on their tsconfig.json file at build time. HOT 3
- Explicit Resource Management normative changes for April 2024
- Improve Object.hasOwn HOT 4
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.