From fa0ce33ad73fcf5882483d1b12ab7354dc72f6dc Mon Sep 17 00:00:00 2001 From: Retsam Date: Tue, 30 Jan 2018 19:18:55 -0500 Subject: [PATCH] Restructure Typescript bindings Restructures the current typescript bindings, removing the module wrapper. The current typings fail with "error TS2666: Exports and export assignments are not permitted in module augmentations". I don't think a module wrapper is necessary (c.f. redux typings: https://github.com/reactjs/redux/blob/master/index.d.ts) --- index.d.ts | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/index.d.ts b/index.d.ts index 41664da..a100f73 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,20 +1,12 @@ import { ChildProcess } from 'child_process'; -declare module 'dynamodb-local' { - type argValues = '-cors' | '-dbPath' | '-delayTransientStatuses' | '-help' | '-inMemory' | '-optimizeDbBeforeStartup' | '-port' | '-sharedDb'; +type argValues = '-cors' | '-dbPath' | '-delayTransientStatuses' | '-help' | '-inMemory' | '-optimizeDbBeforeStartup' | '-port' | '-sharedDb'; - export interface InstallerConfig { - installPath: string; - downloadUrl: string; - } - - namespace DynamoDbLocal {} - - export class DynamoDbLocal { - static configureInstaller(config: InstallerConfig): void; - static launch(portNumber: number, dbPath: string | null, args: argValues[], verbose?: boolean): Promise; - static stop(portNumber: number): void; - } - - export = DynamoDbLocal; +export interface InstallerConfig { + installPath: string; + downloadUrl: string; } + +export function configureInstaller(config: InstallerConfig): void; +export function launch(portNumber: number, dbPath?: string | null, args?: argValues[], verbose?: boolean): Promise; +export function stop(portNumber: number): void;