-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
lib/node/actions/http_client.dart
Outdated
|
||
external HttpClient( | ||
extension type HttpClient (JSObject obj) { | ||
external HttpClient.fromAgent( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this 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 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Convert to use extension types; what was formerly known as inline classes.
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.