-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Closed
Description
-
[ 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.
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;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels