Merge pull request #21434 from mrmlnc/compute_stdev

[compute-stdev] Add typings for "compute-stdev" package
This commit is contained in:
Nathan Shively-Sanders
2017-11-13 16:11:35 -08:00
committed by GitHub
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import stdev = require('compute-stdev');
// $ExpectType number
stdev([1, 2, 3]);

8
types/compute-stdev/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for compute-stdev 1.0
// Project: https://github.com/compute-io/stdev
// Definitions by: mrmlnc <https://github.com/mrmlnc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function stdev(data: ArrayLike<number>): number;
export = stdev;

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"compute-stdev-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }