Skip to content

Improve typing of predicate param to function WrapperArray<>.filter(predicate) #1068

Closed
@ascott18

Description

@ascott18

What problem does this feature solve?

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions