From c937920c397560dbc2527715460c059a9743b96f Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Wed, 19 Mar 2025 15:28:03 +0100 Subject: [PATCH] typings.d.ts: write in ESM format Commit 99aa76a22 indicates that ESM is used, so write typings.d.ts in that format too. Fixes #1059 --- scripts/execTypes.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/execTypes.js b/scripts/execTypes.js index 6f9e4aefb..27aa608f4 100644 --- a/scripts/execTypes.js +++ b/scripts/execTypes.js @@ -14,10 +14,9 @@ module.exports = { shell.exec(`npx tsc -p types.tsconfig.json --rootDir packages --outFile ${outFile}`) const namespaceDeclaration = ` -import * as Interact from '@interactjs/types/index' - -export as namespace Interact -export = Interact +declare module '@interactjs/types' { + export * from '@interactjs/types/index'; +} `.trimStart() await fs.promises.writeFile(path.join(outDir, 'typings.d.ts'), namespaceDeclaration)