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

QueryList predicate type aliases #2090

Merged
merged 3 commits into from
Feb 6, 2018
Merged

QueryList predicate type aliases #2090

merged 3 commits into from
Feb 6, 2018

Conversation

giladgray
Copy link
Contributor

  • add type aliases for ItemPredicate<T> and ItemListPredicate<T> (a la ItemRenderer<T>)
  • move itemRenderer.ts file into select/src/common

@blueprint-bot
Copy link

move itemRenderer file into select/common

Preview: documentation | landing | table

@@ -20,6 +20,8 @@ export interface IListItemsProps<T> extends IProps {
* (Supports filter algorithms that operate on the entire set, rather than individual items.)
*
* If defined with `itemPredicate`, this prop takes priority and the other will be ignored.
*
* An alias type `ItemListPredicate<T>` is provided to simplify the process of authoring predicates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then why not use the alias here in the typedef?

Copy link
Contributor Author

@giladgray giladgray Feb 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i want it to show the full signature in the docs, not the type alias name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you should be able to click on it to see the full def. I don't like this compromise 🙅‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok fair

@giladgray giladgray mentioned this pull request Feb 6, 2018
@blueprint-bot
Copy link

use alias types in interface

Preview: documentation | landing | table

@giladgray giladgray merged commit f49acc9 into develop Feb 6, 2018
@giladgray giladgray deleted the gg/predicate-types branch February 6, 2018 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants