-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Export public API types from foundation/*.dart library. #105648
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
Conversation
@@ -10,6 +10,10 @@ import 'package:meta/meta.dart'; | |||
import 'constants.dart'; | |||
import 'isolates.dart' as isolates; | |||
|
|||
export 'dart:async' show FutureOr; |
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.
that seems to be a bug in the lint, FutureOr isn't actually in a public API as far as I can tell
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.
Good catch! I'll take a look.
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.
Actually ComputeCallback
returns a FutureOr
@@ -4,6 +4,8 @@ | |||
|
|||
import 'dart:async'; | |||
|
|||
export 'dart:async' show FutureOr; |
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.
ugh, no getting away from this one i guess.
i would be tempted to suggest an //ignore
on this one and just export Future...
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.
exporting Future
is a noop because it's already exported by dart:core
. FutureOr
is a littlle special because most of the time users don't use directly FutureOr
they use Future
or a type. So I think it makes sense to special case this type.
This is fantastic. |
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.
Related to dart-lang/sdk#58731 this PR exports public API types from foundation/*.dart library.