diff --git a/python-shell/index.d.ts b/python-shell/index.d.ts index cd61953dd7..f28cf45693 100644 --- a/python-shell/index.d.ts +++ b/python-shell/index.d.ts @@ -3,40 +3,37 @@ // Definitions by: Dolan Miu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module "python-shell" { - export class PythonShell { - on(message: string, callback: (message: string) => void): void; - end(callback: (message: string) => void): void; - send(message: string): void; - send(message: any): void; +export class PythonShell { + on(message: string, callback: (message: string) => void): void; + end(callback: (message: string) => void): void; + send(message: any | string): void; - constructor(scriptName: string, options?: InstanceOptions); - defaultOptions: RunOptions; - } + constructor(scriptName: string, options?: InstanceOptions); + defaultOptions: RunOptions; +} - export interface RunOptions { - mode?: string; - formatter?: string; - parser?: string; - encoding?: string; - pythonPath?: string; - pythonOptions?: Array; - scriptPath?: string; - args?: Array; - } +export interface RunOptions { + mode?: string; + formatter?: string; + parser?: string; + encoding?: string; + pythonPath?: string; + pythonOptions?: string[]; + scriptPath?: string; + args?: string[]; +} - export interface InstanceOptions { - script?: string; - command?: string; - stdin?: any; - stdout?: any; - stderr?: any; - childProcess?: string; - terminated?: any; - exitCode?: any; - args?: Array; - } +export interface InstanceOptions { + script?: string; + command?: string; + stdin?: any; + stdout?: any; + stderr?: any; + childProcess?: string; + terminated?: any; + exitCode?: any; + args?: any[]; +} - export function run(scriptName: string, RunOptions: RunOptions, callback: (err: Error, results?: any) => void): void; - export function run(scriptName: string, callback: (err: Error, results?: any) => void): void; -} \ No newline at end of file +export function run(scriptName: string, RunOptions: RunOptions, callback: (err: Error, results?: any) => void): void; +export function run(scriptName: string, callback: (err: Error, results?: any) => void): void;