strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
parent
4ee40c3345
commit
987168b863
214 changed files with 939 additions and 785 deletions
|
@ -76,7 +76,7 @@ class MyCustomLogger implements Logger {
|
|||
}
|
||||
|
||||
export function initDb(justBorrow = false, sync = false, log = false) {
|
||||
const enableLogging = log || !['production', 'test'].includes(process.env.NODE_ENV);
|
||||
const enableLogging = log || !['production', 'test'].includes(process.env.NODE_ENV || '');
|
||||
|
||||
try {
|
||||
const conn = getConnection();
|
||||
|
@ -93,7 +93,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
|
|||
synchronize: process.env.NODE_ENV === 'test' || sync,
|
||||
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
|
||||
logging: enableLogging,
|
||||
logger: enableLogging ? new MyCustomLogger() : null,
|
||||
logger: enableLogging ? new MyCustomLogger() : undefined,
|
||||
entities: [
|
||||
Meta,
|
||||
Instance,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue