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
Describe the bug
I'm working on a project to run react directly from the browser. I configured everything for Typescript as showing below in the code snippet. But Monaco still seems that I'm running javascripts for some reasons.
Monaco would complain about interfaces and type annotations Type annotations can only be used in TypeScript files. similar syntax error would be shown if you add the code into .jsx file in vs code.
Expected behavior
Expected behavior that Monaco should treat the file like it's .tsx not tsx since selected language is typescript
Screenshots
If applicable, add screenshots to help to explain your problem.
The text was updated successfully, but these errors were encountered:
Malnasser
changed the title
Typescript Interfaces: Type annotations can only be used in TypeScript files.
Typescript Interfaces: Type annotations can only be used while typeScript configuration setup.
Aug 10, 2024
There is no full support of JSX/TSX out of the box. Check this issue (particularly this comment might be helpful). Also, remove allowJs: true for interfaces to be recognized.
Describe the bug
I'm working on a project to run react directly from the browser. I configured everything for Typescript as showing below in the code snippet. But Monaco still seems that I'm running javascripts for some reasons.
Steps to reproduce the behavior:
Type annotations can only be used in TypeScript files.
similar syntax error would be shown if you add the code into.jsx
file in vs code.Expected behavior
Expected behavior that Monaco should treat the file like it's
.tsx
nottsx
since selected language istypescript
Screenshots
If applicable, add screenshots to help to explain your problem.
The text was updated successfully, but these errors were encountered: