Fix error TS2497 on import * as X from 'statsd-client':

Per Microsoft/TypeScript#5073, closed as `By Design` by @mhegazy, we need to
export a namespace for `import *` to work, else `TS2497`. That clashes with
the `export = ClassName` pattern unless you also merge in a namespace, e.g.
with `namespace ClassName {}`.
This commit is contained in:
Garth Kidd
2016-07-26 12:54:31 +10:00
parent dd0d729d5d
commit f7763de15e
2 changed files with 4 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
/// <reference path="statsd-client.d.ts" />
import * as StatsdClient from 'statsd-client';
const statsd = new StatsdClient({ debug: true });

View File

@@ -99,5 +99,6 @@ declare module "statsd-client" {
getChildClient(name: string): StatsdClient;
}
namespace StatsdClient {}
export = StatsdClient;
}