mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #34442 from djcsdy/math-sign
[math-sign] Add type definitions
This commit is contained in:
Vendored
+8
@@ -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;
|
||||
@@ -0,0 +1,7 @@
|
||||
import sign = require("math-sign");
|
||||
|
||||
// $ExpectType number
|
||||
sign(5);
|
||||
|
||||
// $ExpectType number
|
||||
sign(-2);
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user