-
Notifications
You must be signed in to change notification settings - Fork 722
Labels
d.enhancementImproves docs with specific askImproves docs with specific aske2-daysCan complete in < 5 days of normal, not dedicated, workCan complete in < 5 days of normal, not dedicated, workp.referencesp2-mediumNecessary but not urgent concern. Resolve when possible.Necessary but not urgent concern. Resolve when possible.t.cli-toolsRelates to the dart command line toolsRelates to the dart command line toolst.diagnosticsRelates to diagnostics, analysis, or linting of codeRelates to diagnostics, analysis, or linting of code
Description
Topic
https://dart.dev/tools/doc-comments/references
Notes
Add Documentation imports section to Documentation comment references guide.
Feature reference: dart-lang/sdk#56186
Follow up to #6080.
\cc @srawlins CCing you so you can follow this issue. If you do end up wanting to work on these docs, feel free to assign yourself. Thanks for your work on the initial docs and this feature!!
Content from https://github.com/dart-lang/dartdoc/pull/3935/files
Documentation imports (/// @docImport
)
Libraries that are only referenced in documentation comments ([Future]
) can be imported with a
/// @docImport '<uri>'
comment on the library
element, like:
/// @docImport 'dart:async';
/// @docImport 'package:flutter/element.dart' show Element;
/// @docImport '../path/to/somwhere.dart';
/// @docImport 'dart:html' as 'html';
library;
/// We can now reference [Future] from dart:async, [Element] from Flutter's element library,
/// and [html.Element] from dart:html, even if none of these libraries are actually imported
/// by this library.
class Foo {}
Metadata
Metadata
Assignees
Labels
d.enhancementImproves docs with specific askImproves docs with specific aske2-daysCan complete in < 5 days of normal, not dedicated, workCan complete in < 5 days of normal, not dedicated, workp.referencesp2-mediumNecessary but not urgent concern. Resolve when possible.Necessary but not urgent concern. Resolve when possible.t.cli-toolsRelates to the dart command line toolsRelates to the dart command line toolst.diagnosticsRelates to diagnostics, analysis, or linting of codeRelates to diagnostics, analysis, or linting of code