diff --git a/types/compute-argmax/compute-argmax-tests.ts b/types/compute-argmax/compute-argmax-tests.ts new file mode 100644 index 0000000000..a2d6047a53 --- /dev/null +++ b/types/compute-argmax/compute-argmax-tests.ts @@ -0,0 +1,4 @@ +import compute = require('compute-argmax'); + +const data = [3, 2, 5, 2, 5]; +const idx: number[] = compute(data); diff --git a/types/compute-argmax/index.d.ts b/types/compute-argmax/index.d.ts new file mode 100644 index 0000000000..feb7e57d71 --- /dev/null +++ b/types/compute-argmax/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for compute-argmax 1.0 +// Project: https://github.com/compute-io/argmax +// Definitions by: Eric Crosson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function argmax(values: ArrayLike): number[]; + +export = argmax; diff --git a/types/compute-argmax/tsconfig.json b/types/compute-argmax/tsconfig.json new file mode 100644 index 0000000000..69140bb89a --- /dev/null +++ b/types/compute-argmax/tsconfig.json @@ -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" + ] +} diff --git a/types/compute-argmax/tslint.json b/types/compute-argmax/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/compute-argmax/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }