Skip to content

Property 'find' does not exist on type  #29473

@mariohmol

Description

@mariohmol

"typescript": "^3.2.2"

Search Terms: Property 'find' does not exist on type

Code

https://github.com/mariohmol/gherkin/blob/master/index.ts#L17

const found = c.students.find(s => s === student);

Running tsc index.ts

Config:
https://github.com/mariohmol/gherkin/blob/master/tsconfig.json#L8

Expected behavior: Compile sucessfully

Actual behavior:
https://travis-ci.org/mariohmol/gherkin/jobs/481149988#L446

index.ts:17:34 - error TS2339: Property 'find' does not exist on type 'Student[]'.

17         const found = c.students.find(s => s === student); 

Playground Link: https://github.com/mariohmol/gherkin

Related Issues: #6945

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions