Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#53037 update(float-equal): v3 update (ESM …
Browse files Browse the repository at this point in the history
…migration) by @peterblazejewicz

- v3 is breaking as JS package converted to ESM
- reflected in DT details

https://github.com/sindresorhus/float-equal/releases/tag/v3.0.0

Thanks!
  • Loading branch information
peterblazejewicz authored May 27, 2021
1 parent 33455fc commit c51eb58
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions types/float-equal/float-equal-tests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import floatEqual = require("float-equal");
import floatEqual from "float-equal";

floatEqual(0.1 + 0.2, 0.3); // $ExpectType boolean
// $ExpectType boolean
floatEqual(0.1 + 0.2, 0.3);
8 changes: 6 additions & 2 deletions types/float-equal/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Type definitions for float-equal 2.0
// Type definitions for float-equal 3.0
// Project: https://github.com/sindresorhus/float-equal#readme
// Definitions by: Dolan Murvihill <https://github.com/dmurvihill>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
* Check if two floats are almost equal
*/
declare function floatEqual(a: number, b: number): boolean;
export = floatEqual;

export default floatEqual;

0 comments on commit c51eb58

Please sign in to comment.