From 731b9959864582bbc918f750624fb278ea6dd8b1 Mon Sep 17 00:00:00 2001 From: Matthias Kleine Date: Sun, 1 May 2022 12:04:41 +0200 Subject: [PATCH] tsconfig update --- admin/admin.d.ts | 1 - admin/tsconfig.json | 7 ------- lib/adapter-config.d.ts | 7 +++++-- tsconfig.json | 10 ++++++---- 4 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 admin/admin.d.ts delete mode 100644 admin/tsconfig.json diff --git a/admin/admin.d.ts b/admin/admin.d.ts deleted file mode 100644 index 13444d9..0000000 --- a/admin/admin.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare let systemDictionary: Record>; diff --git a/admin/tsconfig.json b/admin/tsconfig.json deleted file mode 100644 index b99d93e..0000000 --- a/admin/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../tsconfig.json", - "include": [ - "./**/*.d.ts", - "./**/*.js" - ] -} diff --git a/lib/adapter-config.d.ts b/lib/adapter-config.d.ts index 6fb7fe5..e0fbfa9 100644 --- a/lib/adapter-config.d.ts +++ b/lib/adapter-config.d.ts @@ -2,7 +2,7 @@ // using the actual properties present in io-package.json // in order to provide typings for adapter.config properties -import { native } from "../io-package.json"; +import { native } from '../io-package.json'; type _AdapterConfig = typeof native; @@ -13,4 +13,7 @@ declare global { // Do not enter anything here! } } -} \ No newline at end of file +} + +// this is required so the above AdapterConfig is found by TypeScript / type checking +export {}; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 1cb9e07..226ea75 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,4 @@ +// Root tsconfig to set the settings and power editor support for all TS files { "compileOnSave": true, "compilerOptions": { @@ -10,6 +11,7 @@ "module": "commonjs", "moduleResolution": "node", + "esModuleInterop": true, // this is necessary for the automatic typing of the adapter config "resolveJsonModule": true, @@ -22,9 +24,10 @@ "noImplicitAny": false, // "noUnusedLocals": true, // "noUnusedParameters": true, + "useUnknownInCatchVariables": false, - // Consider targetting es2017 or higher if you require the new NodeJS 8+ features - "target": "es2017", + // Consider targetting es2019 or higher if you only support Node.js 12+ + "target": "es2018", }, "include": [ @@ -32,7 +35,6 @@ "**/*.d.ts" ], "exclude": [ - "node_modules/**", - "admin/**" + "node_modules/**" ] } \ No newline at end of file