Update internal TypeScript version in editor
MatchuPitchu opened this issue · comments
Is your feature request related to a problem? Please describe.
Is it possible to manually set the TypeScript version that the editor uses in the frontend or update the TypeScript version to the latest?
I use @monaco-editor/react
as a playground for React components. Some of my components return the type ReactNode
, which is absolutely ok up from TypeScript 5.1 onwards (see this part in an article). However, this is currently highlighted as an type error with the following text:
'MyComponent' cannot be used as a JSX component. Its return type 'ReactNode' is not a valid JSX element. Type 'string' is not assignable to type 'ReactElement<any, any>'.(2786)
Describe the solution you'd like
- Developer can set manually the wished TypeScript version
- monaco-editor uses always the latest TypeScript version
This issue should be addressed to microsoft/monaco-editor.
This might be related.