tscheck - in tsconfig.json

This commit is contained in:
Jan Prochazka
2020-01-06 23:02:03 +01:00
parent c886846268
commit 20a55fdd7c
10 changed files with 18 additions and 12 deletions

View File

@@ -19,7 +19,7 @@
},
"scripts": {
"start": "nodemon src/index.js",
"tscheck": "tsc --allowJs --noEmit src/index.js"
"ts": "tsc"
},
"devDependencies": {
"nodemon": "^2.0.2",

View File

@@ -1,8 +1,6 @@
// @ts-check
const path = require('path');
const { fork } = require('child_process');
// @ts-ignore
const _ = require('lodash');
const nedb = require('nedb-promises');

View File

@@ -1,3 +1,4 @@
const connections = require('./connections');
const socket = require('../utility/socket');
const { fork } = require('child_process');
@@ -27,6 +28,7 @@ module.exports = {
connection,
};
this.opened.push(newOpened);
// @ts-ignore
subprocess.on('message', ({ msgtype, ...message }) => {
this[`handle_${msgtype}`](id, message);
});

View File

@@ -1,4 +1,3 @@
// @ts-check
class DatabaseAnalyser {
/**

View File

@@ -1,4 +1,3 @@
// @ts-check
const fs = require('fs-extra');
const path = require('path');

View File

@@ -1,4 +1,5 @@
const mssql = require('mssql');
const MsSqlAnalyser = require('./MsSqlAnalyser');
module.exports = {
async connect({ server, port, user, password }) {

View File

@@ -1,5 +1,3 @@
// @ts-check
const os = require('os');
const path = require('path');
const fs = require('fs-extra');

View File

@@ -1,5 +1,3 @@
// @ts-check
let socket = null;
module.exports = {

View File

@@ -1,6 +1,3 @@
// @ts-check
// @ts-ignore
const _ = require('lodash');
const express = require('express');

14
api/tsconfig.json Normal file
View File

@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"allowJs": true,
"checkJs": true,
"noEmit": true
},
"files": [
"src/index.js",
"src/engines/mssql/index.js",
"src/engines/mysql/index.js",
"src/engines/postgres/index.js"
]
}