monaco-editor
monaco-editor copied to clipboard
[Feature Request] Update TypeScript version
Context
- [X] This issue is not a bug report. (please use a different template for reporting a bug)
- [X] This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
Hello! If I'm reading this right, I think the standalone Monaco editor ships with a hardcoded version of TypeScript, and it's a few versions out of date?
Are there any plans to bump this to the latest version? There are some newer language features we'd like to use.
https://github.com/microsoft/monaco-editor/blob/3e9f3304ce010b125ab21031a0226c034b95b114/src/language/typescript/lib/typescriptServicesMetadata.ts#L5
We also are facing some issues because an inference improvement in 4.7+
I've opened https://github.com/microsoft/monaco-editor/pull/3350, let's see if it gets through review soon™️
Facing similar issues using the @overload
to allow for documenting deprecated function signatures using JSDoc.
I have also a type problem with the older TypeScript version.
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 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