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

[dart:js_interop] Refactor JS types to use extension types #52687

Closed
Tracked by #54039
srujzs opened this issue Jun 12, 2023 · 0 comments
Closed
Tracked by #54039

[dart:js_interop] Refactor JS types to use extension types #52687

srujzs opened this issue Jun 12, 2023 · 0 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-js-interop Issues that impact all js interop

Comments

@srujzs
Copy link
Contributor

srujzs commented Jun 12, 2023

Currently, we use a "custom" implementation of @staticInterop to implement dart:js_interop's JS types e.g. JSString. These types lower to different types based on backends, and their external members are also patched in instead of lowered. Since these types are only loosely related to @staticInterop, we should instead use a different annotation e.g. @JSType that makes it clear these types are different from other @staticInterop types.

Edit: I don't think using a different annotation is necessary as we can move directly to extension types. As such, I'm refocusing this bug to accomplish that effort.

@srujzs srujzs added web-js-interop Issues that impact all js interop area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Jun 12, 2023
@srujzs srujzs self-assigned this Jun 12, 2023
@srujzs srujzs changed the title [dart:js_interop] Refactor JS types to not use @staticInterop [dart:js_interop] Refactor JS types to use extension types Nov 9, 2023
srujzs added a commit to flutter/engine that referenced this issue Nov 10, 2023
JS types are going to become extension types and as such, @staticInterop
types cannot implement these types. When we migrate these classes to
extension types, we can add back the subtyping.

Enables dart-lang/sdk#52687.
@srujzs srujzs closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-js-interop Issues that impact all js interop
Projects
None yet
Development

No branches or pull requests

1 participant