Update Monaco's vendored TypeScript from v5.0.2 to support React JSX types and other language changes #4412
Closed
2 tasks done
Labels
feature-request
Request for new features or functionality
Context
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:
package.json
files (and tsdocs for the website to be compatible)npm i
andyarn install
(for the website) for the affected packagesimport-typescript
script from the root package.json to generate the vendored filesI 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
The text was updated successfully, but these errors were encountered: