Skip to content

Ensure: link static methods when referenced as default values #97

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

Closed
sethladd opened this issue Jan 12, 2015 · 2 comments
Closed

Ensure: link static methods when referenced as default values #97

sethladd opened this issue Jan 12, 2015 · 2 comments

Comments

@sethladd
Copy link
Contributor

Was https://code.google.com/p/dart/issues/detail?id=18266

For the following method:

min(Iterable iterable, {Comparator comparator = Comparable.compare});

Currently the docs just display the following unstyled text for the default value:

function(Comparable#compare)

It would be useful if it linked to the Comparable.compare docs instead, as references in docs do, with similar styling.

Actually, should have been more general. I would want to link to any public names referenced by the default value expression. Examples:

final Duration ANIM_DURATION_DEFAULT = const Duration(milliseconds: 500);
slideIn(Element el, {Duration duration : ANIM_DURATION_DEFAULT});
fadeIn(Element el, {Duration duration : ANIM_DURATION_DEFAULT});
// ...

addChild(Node child, [Node parent = const Node.root()]) // ...

rotate(num radians, {num min: -PI, max: PI}) // ...
@sethladd
Copy link
Contributor Author

@seaneagan can you point me to some code in the wild that exhibits this kind of API design?

@sethladd
Copy link
Contributor Author

We do show and link const values now.

I don't see min(iterable) or addChild(child) in the SDK anymore.

Please re-open if there's a good example for us.

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

No branches or pull requests

1 participant