typings refactor - no compilation, renamed package

This commit is contained in:
Jan Prochazka
2020-02-02 12:02:41 +01:00
parent af80a2799f
commit 4fe2912707
20 changed files with 68 additions and 103 deletions

View File

@@ -6,7 +6,7 @@ const { fork } = require('child_process');
const DatabaseAnalyser = require('../engines/default/DatabaseAnalyser');
module.exports = {
/** @type {import('@dbgate/lib').OpenedDatabaseConnection[]} */
/** @type {import('dbgate').OpenedDatabaseConnection[]} */
opened: [],
requests: {},
@@ -48,7 +48,7 @@ module.exports = {
return newOpened;
},
/** @param {import('@dbgate/lib').OpenedDatabaseConnection} conn */
/** @param {import('dbgate').OpenedDatabaseConnection} conn */
async sendRequest(conn, message) {
const msgid = uuidv1();
const promise = new Promise((resolve, reject) => {

View File

@@ -1,7 +1,7 @@
class DatabaseAnalyser {
/**
*
* @param {import('@dbgate/lib').EngineDriver} driver
* @param {import('dbgate').EngineDriver} driver
*/
constructor(pool, driver) {
this.pool = pool;
@@ -11,7 +11,7 @@ class DatabaseAnalyser {
async runAnalysis() {}
}
/** @returns {import('@dbgate/lib').DatabaseInfo} */
/** @returns {import('dbgate').DatabaseInfo} */
DatabaseAnalyser.createEmptyStructure = () => ({
tables: [],
});

View File

@@ -1,5 +1,5 @@
/** @return {import('@dbgate/lib').EngineDriver} */
/** @return {import('dbgate').EngineDriver} */
function getDriver(connection) {
const { engine } = connection;
return require(`./${engine}`);