Add type definitions for float-equal version 2.0 (#40195)

This commit is contained in:
Dolan Murvihill
2019-11-07 10:27:19 -08:00
committed by Nathan Shively-Sanders
parent 7221daab35
commit bb1dd9f522
4 changed files with 34 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
import floatEqual = require("float-equal");
floatEqual(0.1 + 0.2, 0.3); // $ExpectType boolean
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for float-equal 2.0
// Project: https://github.com/sindresorhus/float-equal#readme
// Definitions by: Dolan Murvihill <https://github.com/dmurvihill>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function floatEqual(a: number, b: number): boolean;
export = floatEqual;
+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",
"float-equal-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }