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

Get rid of %external usage #118

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Get rid of %external usage #118

merged 1 commit into from
Jul 24, 2024

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Jul 23, 2024

This fixes rescript-lang/rescript#6905.

%external is weird and not typesafe and should probably be removed from the compiler.

Make use of globalThis instead. Downside: In older browsers, globalThis will need to be polyfilled. It is supported in all modern browsers though, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis.

@cknitt cknitt requested review from cristianoc, zth and cometkim July 23, 2024 15:33
@cknitt cknitt merged commit 543ce14 into master Jul 24, 2024
1 check passed
@cknitt cknitt deleted the no-percent-external branch July 24, 2024 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RescriptReactRouter crash on master (window vs. $$window)
3 participants