Merge pull request #34442 from djcsdy/math-sign

[math-sign] Add type definitions
This commit is contained in:
Daniel Rosenwasser
2019-04-03 11:30:10 -07:00
committed by GitHub
4 changed files with 39 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for math-sign 1.0
// Project: https://github.com/sindresorhus/math-sign#readme
// Definitions by: Daniel Cassidy <https://github.com/djcsdy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function sign(x: number): number;
export = sign;
+7
View File
@@ -0,0 +1,7 @@
import sign = require("math-sign");
// $ExpectType number
sign(5);
// $ExpectType number
sign(-2);
+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",
"math-sign-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }