Skip to content

Missing / Incorrect Definitions for Chainable first / last #24

@sfrooster

Description

@sfrooster

Was attempting to do something like the following:
let eventName = _.chain("X.Y:Z").split(":").first().split(".").last().value();

and receiving an error on "first".

Adding the following:
interface LoDashExplicitArrayWrapper<T> { first(): LoDashExplicitWrapper<T>; }

fixed it. This seems like a valid addition because there is a near similar definition for "last" which looks like:
interface LoDashExplicitArrayWrapper<T> { last(): T; }

The difference between the two being LoDashExplicitWrapper vs T.

So I changed last to also return LoDashExplicitWrapper and now the above works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions