From a4be47b9041fe020a2811c299e315b2dfbb766fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fernando=20H=C3=B6wer=20Barbosa?= Date: Fri, 30 Jun 2023 14:44:30 +0200 Subject: [PATCH] Use sinfle file for jsdom types --- types/base.d.ts => jsdom-napi-rs-canvas.d.ts | 26 ++++++++++++++++++++ types/index.d.ts | 25 ------------------- 2 files changed, 26 insertions(+), 25 deletions(-) rename types/base.d.ts => jsdom-napi-rs-canvas.d.ts (94%) delete mode 100755 types/index.d.ts diff --git a/types/base.d.ts b/jsdom-napi-rs-canvas.d.ts similarity index 94% rename from types/base.d.ts rename to jsdom-napi-rs-canvas.d.ts index cc2e9e0..4d0d60b 100755 --- a/types/base.d.ts +++ b/jsdom-napi-rs-canvas.d.ts @@ -461,3 +461,29 @@ declare module 'jsdom-napi-rs-canvas' { XPathEvaluator: typeof XPathEvaluator; } } + +// Type definitions for jsdom 21.1 +// Project: https://github.com/jsdom/jsdom +// Definitions by: Leonard Thieu +// Johan Palmfjord +// ExE Boss +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Minimum TypeScript Version: 4.5 + +/// + +declare module 'jsdom-napi-rs-canvas' { + interface DOMWindow { + FinalizationRegistry: FinalizationRegistryConstructor; + WeakRef: WeakRefConstructor; + InputEvent: typeof InputEvent; + External: typeof External; + } +} + +// Necessary to avoid breaking dependents because of the dependency +// on the `ESNext.WeakRef` lib: +// tslint:disable-next-line: no-empty-interface +interface FinalizationRegistryConstructor {} +// tslint:disable-next-line: no-empty-interface +interface WeakRefConstructor {} diff --git a/types/index.d.ts b/types/index.d.ts deleted file mode 100755 index 266fad6..0000000 --- a/types/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Type definitions for jsdom 21.1 -// Project: https://github.com/jsdom/jsdom -// Definitions by: Leonard Thieu -// Johan Palmfjord -// ExE Boss -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Minimum TypeScript Version: 4.5 - -/// - -declare module 'jsdom-napi-rs-canvas' { - interface DOMWindow { - FinalizationRegistry: FinalizationRegistryConstructor; - WeakRef: WeakRefConstructor; - InputEvent: typeof InputEvent; - External: typeof External; - } -} - -// Necessary to avoid breaking dependents because of the dependency -// on the `ESNext.WeakRef` lib: -// tslint:disable-next-line: no-empty-interface -interface FinalizationRegistryConstructor {} -// tslint:disable-next-line: no-empty-interface -interface WeakRefConstructor {}