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

Fix usage of types coming outside of TS base lib & allow embedders to intercept TT calls also in the worker #184148

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

alexdima
Copy link
Member

@alexdima alexdima commented Jun 2, 2023

No description provided.

@alexdima alexdima self-assigned this Jun 2, 2023
@alexdima alexdima enabled auto-merge June 2, 2023 10:41
@alexdima alexdima merged commit 8092bb2 into main Jun 2, 2023
7 checks passed
@alexdima alexdima deleted the alexd/disciplinary-macaw branch June 2, 2023 11:52
*/
createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(
createTrustedTypesPolicy(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexdima Shouldn't this method be optional? createTrustedTypesPolicy?()

Because of this change, Monaco Editor 0.39 requires this method to be implemented when creating a new environment:

https://microsoft.github.io/monaco-editor/docs.html#interfaces/Environment.html

This "breaks" type-checking in some Monaco Editor examples:

https://github.com/microsoft/monaco-editor/blob/12a85be518baa63571b5ccf780cfeec12b0ff2b4/samples/browser-esm-webpack/index.js#L3-L19

Error: Property 'createTrustedTypesPolicy' is missing in type '{ getWorkerUrl: (_workerId: string, label: string) => string; }' but required in type 'Environment'. (ts)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #185454 with a fix.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants