Skip to content

Commit

Permalink
Merge pull request #2 from zspitz/WScriptFullAPI
Browse files Browse the repository at this point in the history
Added properties/methods for WScript
  • Loading branch information
zspitz committed Mar 31, 2015
2 parents 3a443a2 + d53e0c2 commit 71a5868
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions src/lib/scriptHost.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,26 @@ interface ActiveXObject {
}
declare var ActiveXObject: ActiveXObject;

interface ITextWriter {
interface ITextStreamBase {
Column: number;
Line: number;
Close(): void;
}

interface ITextWriter extends ITextStreamBase {
Write(s: string): void;
WriteBlankLines(intLines: number): void;
WriteLine(s: string): void;
Close(): void;
}

interface ITextReader extends ITextStreamBase {
Read(characters: number): string;
ReadAll(): string;
ReadLine(): string;
Skip(characters: number): void;
SkipLine(): void;
AtEndOfLine: boolean;
AtEndOfStream: boolean;
}

declare var WScript: {
Expand All @@ -23,4 +39,17 @@ declare var WScript: {
Arguments: { length: number; Item(n: number): string; };
ScriptFullName: string;
Quit(exitCode?: number): number;
BuildVersion: number;
FullName: string;
Interactive: boolean;
Name: string;
Path: string;
ScriptName: string;
StdIn: ITextReader;
Version: string;
ConnectObject(objEventSource: any, strPrefix: string): void;
CreateObject(strProgID: string, strPrefix?: string): any;
DisconnectObject(obj: any): void;
GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
Sleep(intTime: number): void;
}

0 comments on commit 71a5868

Please sign in to comment.