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';