-
Notifications
You must be signed in to change notification settings - Fork 125
Document @docImport
in README.md
#3935
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
base: main
Are you sure you want to change the base?
Conversation
Implemented in dart-lang/sdk#56186 Credits @srawlins
Thanks for the PR! I'd like to put this off until the implementation is a little bit tidied. There are a few items I hope to finish this quarter before "releasing" the feature:
|
@srawlins, what about this PR now that we have https://dart.dev/tools/doc-comments/references#doc-imports? |
Oh wow, blast from the past 😅 yes I'll review this anew. |
|
||
```dart | ||
/// @docImport 'dart:async'; | ||
/// @docImport 'package:flutter/element.dart' show Element; |
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.
'show' is not supported. (yet?)
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.
Exactly. Noting the umbrella issue for it does mention this was a goal dart-lang/sdk#56186.
/// @docImport 'dart:async'; | ||
/// @docImport 'package:flutter/element.dart' show Element; | ||
/// @docImport '../path/to/somwhere.dart'; | ||
/// @docImport 'dart:html' as 'html'; |
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.
'as' is not supported. (yet?)
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.
Exactly. Noting we have an issue for it dart-lang/sdk#56527 and the umbrella issue for it does mention this was a goal dart-lang/sdk#56186.
Implemented in dart-lang/sdk#56186 (credits @@srawlins).
We should probably document this on
dart.dev
too. But I figured it would be harmless to add it to dartdoc. This is certainly one of the placed I went to look for it 🤣