From 4d4e5cd4dca78480ec7f40e747f424cd107376a4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 5 Jun 2017 21:53:49 +0200 Subject: require -> import --- server/initializers/checker.ts | 2 +- server/initializers/constants.ts | 2 +- server/initializers/database.ts | 4 ++-- server/initializers/installer.ts | 6 +++--- server/initializers/migrator.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 0ee01b0e3..8c3d64b60 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts @@ -1,4 +1,4 @@ -import config = require('config') +import * as config from 'config' import { database as db } from './database' import { CONFIG } from './constants' diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 1072d0de0..7ab019f44 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -1,4 +1,4 @@ -import config = require('config') +import * as config from 'config' import { join } from 'path' // Do not use barrels, remain constants as independent as possible diff --git a/server/initializers/database.ts b/server/initializers/database.ts index c89a8b23c..b0f47876e 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts @@ -1,6 +1,6 @@ -import fs = require('fs') +import * as fs from 'fs' import { join } from 'path' -import Sequelize = require('sequelize') +import * as Sequelize from 'sequelize' import { CONFIG } from './constants' // Do not use barrel, we need to load database first diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index 467164107..2f9b58991 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts @@ -1,8 +1,8 @@ import { join } from 'path' -import config = require('config') +import * as config from 'config' import { each, series } from 'async' -import mkdirp = require('mkdirp') -import passwordGenerator = require('password-generator') +import * as mkdirp from 'mkdirp' +import * as passwordGenerator from 'password-generator' import { database as db } from './database' import { USER_ROLES, CONFIG, LAST_MIGRATION_VERSION } from './constants' diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts index d42cb3ccc..379d43af5 100644 --- a/server/initializers/migrator.ts +++ b/server/initializers/migrator.ts @@ -1,6 +1,6 @@ import { waterfall, eachSeries } from 'async' -import fs = require('fs') -import path = require('path') +import * as fs from 'fs' +import * as path from 'path' import * as Sequelize from 'sequelize' import { database as db } from './database' -- cgit v1.2.3