Add types for compute-argmax (#40313)

* Add types for compute-argmax

* Update types/compute-argmax/index.d.ts

Co-Authored-By: Dmitry Demensky <10235949+demensky@users.noreply.github.com>
This commit is contained in:
Eric Crosson
2019-11-15 15:39:36 -08:00
committed by Pranav Senthilnathan
co-authored by Dmitry Demensky
parent f380829c5c
commit 1fa034cbd8
4 changed files with 36 additions and 0 deletions
@@ -0,0 +1,4 @@
import compute = require('compute-argmax');
const data = [3, 2, 5, 2, 5];
const idx: number[] = compute(data);
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for compute-argmax 1.0
// Project: https://github.com/compute-io/argmax
// Definitions by: Eric Crosson <https://github.com/EricCrosson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function argmax(values: ArrayLike<number>): number[];
export = argmax;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"compute-argmax-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }