Skip to content
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

Change the formatting of parameters that are function types. #3671

Open
kallentu opened this issue Feb 22, 2024 · 0 comments
Open

Change the formatting of parameters that are function types. #3671

kallentu opened this issue Feb 22, 2024 · 0 comments
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@kallentu
Copy link
Member

Related to this PR #3670
All function type parameters are currently in the format of <return-type> <name><type-parameters>()

For example, for source code of:

Object? extractIterableTypeArgument(
        Iterable iterable, Object? Function<T>() extract) =>
    internal.extractTypeArguments<Iterable>(iterable, extract);

Dartdoc renders it as:

extractIterableTypeArgument(Iterable iterable, Object? extract<T>()) → Object?

Object? extract<T>() instead of Object? Function<T>() extract

So perhaps change the format to one of the following

  • Always display the new format.
  • Always display what is in the source code; if they wrote the old school format, support that. There are plenty of cases in the Dart SDK at least that use the old school format, like Future.then.
@kallentu kallentu added P3 A lower priority bug or feature request type-ux A user experience or user interface related issue type-enhancement A request for a change that isn't a bug and removed type-ux A user experience or user interface related issue labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant