From 456fb9ddf8784f402b1fa67aaf8b3d6fde2b7244 Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Sat, 17 Feb 2024 21:59:47 +0100 Subject: [PATCH 1/3] add iobroker types globally --- src/index.ts | 2 +- tsconfig.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index c21ac44..04a1332 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ export * as network from "./network"; export * as translate from "./translate"; -export * as util from "./util"; +export * as util from "./util"; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 5f7afd0..f7935a8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,11 @@ "outDir": "./build/", "removeComments": false, + "types": [ + "@iobroker/types", + "node", + "mocha" + ], // Avoid runtime imports that are unnecessary // "importsNotUsedAsValues": "error", From b42ae033460cd40054a501e52ffd36fed0fd504e Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Sat, 17 Feb 2024 22:04:50 +0100 Subject: [PATCH 2/3] add ts-expect-error for execa --- src/build-adapter-handlers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build-adapter-handlers.ts b/src/build-adapter-handlers.ts index a089881..2922b4b 100644 --- a/src/build-adapter-handlers.ts +++ b/src/build-adapter-handlers.ts @@ -1,4 +1,5 @@ /** Build script to use esbuild without specifying 1000 CLI options */ +// @ts-expect-error esm2cjs/execa needs to be fixed to allow cjs import with types import { ExecaChildProcess, execaNode } from "@esm2cjs/execa"; import { gray, green, red } from "ansi-colors"; import type { From 682e558998743c4d39cc0cbdd1890c44b21ecc98 Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Sat, 17 Feb 2024 22:06:55 +0100 Subject: [PATCH 3/3] happy linter in the lovely winter --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 04a1332..c21ac44 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ export * as network from "./network"; export * as translate from "./translate"; -export * as util from "./util"; \ No newline at end of file +export * as util from "./util";