Skip to content

Inaccurate typings for underscore's _.sample method #20440

@danvk

Description

@danvk
import * as _ from 'underscore';
declare let xs: Foo[];
const x = _.sample(xs);

The type of x should be Foo, but it's {}. cc @pandananta

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