From a45c99e40f806a8c89f06d2618a51d2de68947cc Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Mon, 2 Mar 2020 21:01:47 +0100 Subject: [PATCH] ts fix --- packages/engines/index.d.ts | 2 +- packages/engines/index.js | 1 - packages/engines/tsconfig.json | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/engines/index.d.ts b/packages/engines/index.d.ts index 03399f59..f1c60b21 100644 --- a/packages/engines/index.d.ts +++ b/packages/engines/index.d.ts @@ -1,5 +1,5 @@ import types from "@dbgate/types"; -export function getDriver( +export default function getDriver( connection: string | { engine: string } ): types.EngineDriver; diff --git a/packages/engines/index.js b/packages/engines/index.js index 7bd8afcd..eb2dd4ad 100644 --- a/packages/engines/index.js +++ b/packages/engines/index.js @@ -9,7 +9,6 @@ const drivers = { postgres }; -/** @type {import('@dbgate/types').EngineDriver} */ function getDriver(connection) { if (_.isString(connection)) { return drivers[connection]; diff --git a/packages/engines/tsconfig.json b/packages/engines/tsconfig.json index ebdee054..bdf53cd0 100644 --- a/packages/engines/tsconfig.json +++ b/packages/engines/tsconfig.json @@ -4,7 +4,9 @@ "allowJs": true, "checkJs": true, "noEmit": true, - "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "moduleResolution": "node", "lib": [ "dom", "dom.iterable",