You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WrapperArray.filter is currently typed as filter (predicate: Function): WrapperArray<Vue>. The type of predicate should be more specific.
What does the proposed API look like?
filter (predicate: (value: Wrapper<V>, index: number, array: Wrapper<V>[]) => value is Wrapper<V>): WrapperArray<Vue>
This is the same signature as Array.filter since WrapperArray.filter passes the predicate down to Array.filter.
The text was updated successfully, but these errors were encountered:
ascott18
changed the title
Improve typeing of predicate param to function WrapperArray<>.filter(predicate)
Improve typing of predicate param to function WrapperArray<>.filter(predicate)
Dec 13, 2018
What problem does this feature solve?
WrapperArray.filter
is currently typed asfilter (predicate: Function): WrapperArray<Vue>
. The type ofpredicate
should be more specific.What does the proposed API look like?
filter (predicate: (value: Wrapper<V>, index: number, array: Wrapper<V>[]) => value is Wrapper<V>): WrapperArray<Vue>
This is the same signature as
Array.filter
sinceWrapperArray.filter
passes the predicate down toArray.filter
.The text was updated successfully, but these errors were encountered: