From 7e59eca6a6c56ccf73965cc3602f3c2abd8f4354 Mon Sep 17 00:00:00 2001 From: Joram van den Boezem Date: Thu, 14 Feb 2019 21:18:26 +0100 Subject: [PATCH] export nssm types --- types/nssm/index.d.ts | 22 ++++++++++++---------- types/nssm/nssm-tests.ts | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/types/nssm/index.d.ts b/types/nssm/index.d.ts index c1bc88bdf1..e181e6fc6e 100644 --- a/types/nssm/index.d.ts +++ b/types/nssm/index.d.ts @@ -44,14 +44,16 @@ type NssmCommandFn = & TwoArgCommandFn & PromiseCommandFn; -type Nssm = { - [key in Command]: NssmCommandFn -}; - -interface NssmOptions { - nssmExe?: string; -} - -declare function nssm(serviceName: string, options?: NssmOptions): Nssm; - export = nssm; + +declare function nssm(serviceName: string, options?: nssm.NssmOptions): nssm.Nssm; + +declare namespace nssm { + type Nssm = { + [key in Command]: NssmCommandFn + }; + + interface NssmOptions { + nssmExe?: string; + } +} diff --git a/types/nssm/nssm-tests.ts b/types/nssm/nssm-tests.ts index c0ace009c6..ceabc27e51 100644 --- a/types/nssm/nssm-tests.ts +++ b/types/nssm/nssm-tests.ts @@ -3,7 +3,7 @@ import nssm = require('nssm'); const svcName = 'test'; -const options = { nssmExe: 'nssm.exe' }; +const options: nssm.NssmOptions = { nssmExe: 'nssm.exe' }; const testService = nssm(svcName, options); const propertyName = 'Start';