Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Monaco's vendored TypeScript from v5.0.2 to support React JSX types and other language changes #4412

Closed
2 tasks done
johnyanarella opened this issue Mar 7, 2024 · 1 comment
Labels
feature-request Request for new features or functionality

Comments

@johnyanarella
Copy link
Contributor

johnyanarella commented Mar 7, 2024

Context

  • This issue is not a bug report. (please use a different template for reporting a bug)
  • 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.json files (and tsdocs for the website to be compatible)
  • running npm i and yarn install (for the website) for the affected packages
  • executing the pre-existing import-typescript script 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

@johnyanarella
Copy link
Contributor Author

Verified working now with the latest pre-release after the above PR was merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

1 participant