monaco-editor
monaco-editor copied to clipboard
Update Monaco's vendored TypeScript from v5.0.2 to support React JSX types and other language changes
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
Monaco currently vendors TypeScript 5.0.2 (significantly behind the TypeScript v5.4 released today) and uses this as the basis for compilation and diagnostics performed by its TypeScript worker.
Consequently, TypeScript diagnostics do not reflect the current syntax and capabilities of the language.
For example, when using the current React types (ex. via addExtraLib()) many false errors are reported, as those types rely the introduction of JSX.ElementType and associated changes to TypeScript support for JSX introduced in TypeScript 5.1. This problem extends to other new language features introduced and documented in release notes since v5.0.2.
I previously proposed a PR (#4305) to upgrade to TypeScript v5.3.3 back in December, and just updated that to v5.4.2 to reflect today's release. (It just occurred to me that this PR previously might not have had much visibility given the lack of an associated filed issue--hence this!)
Recapping - the changes introduced by this PR were:
- bumping the version of TypeScript in all of the
package.jsonfiles (and tsdocs for the website to be compatible) - running
npm iandyarn install(for the website) for the affected packages - executing the pre-existing
import-typescriptscript from the root package.json to generate the vendored files
I completely understand if it is awkward to accept the PR given the large amount of generated / vendor code. Perhaps a maintainer could pull this PR locally and then re-run the import-typescript script to validate that the PR contains the unmodified outcome of the script your team created (i.e. no changes to commit).
Thanks!
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response