- Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: nightly (2.6.0-dev.20171004)
Code
Many things broke (on unchanged code) when using lodash type definitions with latest nightly. The inferring is kinda broken (and it's not allowing parameters to be overloaded)
Expected behavior:
To work:
[].forEach((field: keyofData.AddressDataSetMixin)=>{//...})//..._.reduce(citizens,(name,citizen)=>{if(citizen.address&&citizen.address.id===address.id){returncitizen.name}return''},'')//...constfindBase=(field: string)=>{return_.find(definitions,(def)=>def.field===field)!.id}Actual behavior:
Doesnt:
[].forEach((field: keyofData.AddressDataSetMixin)=>{//.../*[ts]Argument of type '(field: "number" | "id" | "name" | "date" | "type" | "street" | "full" | "picture" | "cadastrador...' is not assignable to parameter of type '(value: string, index: number, array: string[]) => void'. Types of parameters 'field' and 'value' are incompatible. Type 'string' is not assignable to type '"number" | "id" | "name" | "date" | "type" | "street" | "full" | "picture" | "cadastrador" | "las...'. */})//..._.reduce(citizens,(name,citizen)=>{/*Argument of type '(name: string, citizen: RemoteArrayProxy<CitizenDataSet>) => string | undefined' is not assignable to parameter of type 'MemoIterator<RemoteArrayProxy<CitizenDataSet>, string | undefined>'. Types of parameters 'name' and 'prev' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'.'*/if(citizen.address&&citizen.address.id===address.id){returncitizen.name}return''},'')// ...constfindBase=(field: string)=>{/* Property 'field' does not exist on type '{}' */return_.find(definitions,(def)=>def.field===field)!.id}Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug