From c51eb58f0cf246253874012f9734f5590fb5659a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20B=C5=82a=C5=BCejewicz=20=28Peter=20Blazejewicz=29?= Date: Thu, 27 May 2021 23:22:59 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#53037=20update(flo?= =?UTF-8?q?at-equal):=20v3=20update=20(ESM=20migration)=20by=20@peterblaze?= =?UTF-8?q?jewicz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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! --- types/float-equal/float-equal-tests.ts | 5 +++-- types/float-equal/index.d.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/types/float-equal/float-equal-tests.ts b/types/float-equal/float-equal-tests.ts index 839eddde8c92f5..b252701bd5215b 100644 --- a/types/float-equal/float-equal-tests.ts +++ b/types/float-equal/float-equal-tests.ts @@ -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); diff --git a/types/float-equal/index.d.ts b/types/float-equal/index.d.ts index e8c176846383e1..c89f324f63c8e0 100644 --- a/types/float-equal/index.d.ts +++ b/types/float-equal/index.d.ts @@ -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 // 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;