// Type definitions for Lo-Dash 4.14
This interface (and others) uses wrong types. Type <T> should not be used in the method name, only in the interface.
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.head
*/
first<T>(): T;
}
To make this code use correct type:
let a = _([1, 2, 3])
.chain()
.first();
Currently this code makes a with type {}.
Definition of interface should be as below, to make a of type number.
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.head
*/
first(): T;
}
[ x ] I tried using the
@types/xxxxpackage and had problems.Authors: @bczengel, @chrootsu, @stepancar
// Type definitions for Lo-Dash 4.14
This interface (and others) uses wrong types. Type
<T>should not be used in the method name, only in the interface.To make this code use correct type:
Currently this code makes
awith type{}.Definition of interface should be as below, to make
aof typenumber.