Add type definitions for imul.

This commit is contained in:
Daniel Cassidy 2019-03-31 17:22:49 +01:00
parent 0341d2d082
commit 91bbb64d78
4 changed files with 36 additions and 0 deletions

4
types/imul/imul-tests.ts Normal file
View File

@ -0,0 +1,4 @@
import imul = require("imul");
// $ExpectType number
imul(2, 4);

8
types/imul/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for imul 1.0
// Project: https://github.com/sindresorhus/imul#readme
// Definitions by: Daniel Cassidy <https://github.com/djcsdy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function imul(a: number, b: number): number;
export = imul;

23
types/imul/tsconfig.json Normal file
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",
"imul-tests.ts"
]
}

1
types/imul/tslint.json Normal file
View File

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