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

Convert to extension types #99

Merged
merged 2 commits into from Aug 11, 2023
Merged

Convert to extension types #99

merged 2 commits into from Aug 11, 2023

Conversation

mit-mit
Copy link
Member

@mit-mit mit-mit commented Aug 9, 2023

Convert to use extension types; what was formerly known as inline classes.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.


external HttpClient(
extension type HttpClient (JSObject obj) {
external HttpClient.fromAgent(
Copy link

Choose a reason for hiding this comment

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

Up to you on how you want to write these, but I've been writing the primary constructor as HttpClient._(JSObject obj) when we only ever use the external constructor so that we don't need a named external constructor.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

One comment on the changelog entry.

Looking forward to extension types! Seems like they'll be very handy for a number of use cases.

CHANGELOG.md Outdated
@@ -1,3 +1,8 @@
## v1.5.2-dev

* Upgrade JS interop code to use extension types
Copy link
Member

Choose a reason for hiding this comment

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

The previous entry hasn't been published, so we can just combine this entry with that one (we don't need a new v1.5.2-dev section).

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

lib/node/os.dart Outdated Show resolved Hide resolved
lib/node/process.dart Outdated Show resolved Hide resolved
@mit-mit mit-mit merged commit deafe40 into main Aug 11, 2023
24 checks passed
@mit-mit mit-mit deleted the exttypes branch August 11, 2023 14:30
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.

None yet

3 participants