Skip to content

Commit

Permalink
Restructure Typescript bindings
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Retsam authored Jan 31, 2018
1 parent 8921069 commit fa0ce33
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -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<ChildProcess>;
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<ChildProcess>;
export function stop(portNumber: number): void;

0 comments on commit fa0ce33

Please sign in to comment.