mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import unique = require("uniq");
|
||||
var data = [1, 2, 2, 3, 4, 5, 5, 5, 6];
|
||||
var datastr = ["1", "2", "2", "3", "4", "5", "5", "5", "6"];
|
||||
var dataMix = ["1", 2,"2", {"2":2}, "3", "4", "5", "5", "5", "6"];
|
||||
console.log(unique(data));
|
||||
console.log(unique(datastr));
|
||||
console.log(unique(dataMix));
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for uniq
|
||||
// Project: https://www.npmjs.com/package/uniq
|
||||
// Definitions by: Hans Windhoff <https://github.com/hansrwindhoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface Uniq{
|
||||
<T>(ip:Array<T>): Array<T>;
|
||||
}
|
||||
|
||||
declare var uniq :Uniq;
|
||||
|
||||
declare module "uniq" {
|
||||
export = uniq;
|
||||
}
|
||||
Reference in New Issue
Block a user