Skip to content

Commit

Permalink
Merge pull request #5 from zspitz/WScriptFullAPI
Browse files Browse the repository at this point in the history
New TextStreamWriter interface with JSDoc and additional members
  • Loading branch information
zspitz committed Mar 31, 2015
2 parents 9221ab2 + 7890a68 commit a7dad34
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/lib/scriptHost.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ interface ActiveXObject {
}
declare var ActiveXObject: ActiveXObject;

interface ITextStreamBase {
interface ITextWriter {
Write(s: string): void;
WriteLine(s: string): void;
Close(): void;
}

interface TextStreamBase {
/**
* The column number of the current character position in an input stream.
*/
Expand All @@ -26,7 +32,7 @@ interface ITextStreamBase {
Close(): void;
}

interface ITextWriter extends ITextStreamBase {
interface TextStreamWriter extends TextStreamBase {
/**
* Sends a string to an output stream.
*/
Expand All @@ -41,7 +47,7 @@ interface ITextWriter extends ITextStreamBase {
WriteLine(s: string): void;
}

interface ITextReader extends ITextStreamBase {
interface TextStreamReader extends TextStreamBase {
/**
* Returns a specified number of characters from an input stream, beginning at the current pointer position.
* Does not return until the ENTER key is pressed.
Expand Down Expand Up @@ -89,12 +95,12 @@ declare var WScript: {
* Exposes the write-only error output stream for the current script.
* Can be accessed only while using CScript.exe.
*/
StdErr: ITextWriter;
StdErr: TextStreamWriter;
/**
* Exposes the write-only output stream for the current script.
* Can be accessed only while using CScript.exe.
*/
StdOut: ITextWriter;
StdOut: TextStreamWriter;
Arguments: { length: number; Item(n: number): string; };
/**
* The full path of the currently running script.
Expand Down Expand Up @@ -132,7 +138,7 @@ declare var WScript: {
* Exposes the read-only input stream for the current script.
* Can be accessed only while using CScript.exe.
*/
StdIn: ITextReader;
StdIn: TextStreamReader;
/**
* Windows Script Host version
*/
Expand Down

0 comments on commit a7dad34

Please sign in to comment.