diff --git a/src/common/HashCode.ts b/src/common/HashCode.ts index 6206001..75b4dc0 100644 --- a/src/common/HashCode.ts +++ b/src/common/HashCode.ts @@ -1,4 +1,4 @@ -import md5 = require('md5') +import * as md5 from 'md5' export default { serialize(object: any): string { diff --git a/src/messaging/MessageFactory.ts b/src/messaging/MessageFactory.ts index 32ae737..ffbe0ef 100644 --- a/src/messaging/MessageFactory.ts +++ b/src/messaging/MessageFactory.ts @@ -1,5 +1,5 @@ import { v1 } from 'uuid' -import he = require('he') +import * as he from 'he' import Connection from '../socket/Connection' import HashCode from '../common/HashCode' import { Message } from './Message' diff --git a/src/socket/Client.ts b/src/socket/Client.ts index dc5eec6..47a5f3c 100644 --- a/src/socket/Client.ts +++ b/src/socket/Client.ts @@ -1,7 +1,7 @@ import { EventEmitter } from 'events' -import url = require('url') +import * as url from 'url' import { Message } from '../../types' -import Stack from 'common/Stack' +import Stack from '../common/Stack' import ConnectionPool from './ConnectionPool' import { client as WebsocketClient, diff --git a/src/socket/Server.ts b/src/socket/Server.ts index 1e8abe3..934d3e7 100644 --- a/src/socket/Server.ts +++ b/src/socket/Server.ts @@ -1,11 +1,11 @@ import { EventEmitter } from 'events' import { networkInterfaces, hostname } from 'os' import { v4 } from 'uuid' -import express = require('express') -import http = require('http') -import url = require('url') +import * as express from 'express' +import * as http from 'http' +import * as url from 'url' import ConnectionPool from './ConnectionPool' -import Stack from 'common/Stack' +import Stack from '../common/Stack' import { Message, Configuration, AddressBook, ServerStatistics } from '../../types' import { default as ApiServer } from '../api/Server' import { diff --git a/tsconfig.json b/tsconfig.json index c1ca073..797b0ea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,15 @@ { "compileOnSave": false, "compilerOptions": { - "outDir": "./dist/out-tsc", + "outDir": "./lib", "baseUrl": "src", - "sourceMap": false, + "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "downlevelIteration": true, - "target": "es5", + "target": "ES5", "typeRoots": [ "./node_modules/@types", "./@types"