Skip to content

Commit 8bf61c7

Browse files
committed
Update LKG
1 parent e4a1c15 commit 8bf61c7

File tree

11 files changed

+14439
-7797
lines changed

11 files changed

+14439
-7797
lines changed

bin/lib.d.ts

Lines changed: 154 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14223,19 +14223,169 @@ declare function importScripts(...urls: string[]): void;
1422314223
/// Windows Script Host APIS
1422414224
/////////////////////////////
1422514225

14226-
declare var ActiveXObject: { new (s: string): any; };
14226+
14227+
interface ActiveXObject {
14228+
new (s: string): any;
14229+
}
14230+
declare var ActiveXObject: ActiveXObject;
1422714231

1422814232
interface ITextWriter {
1422914233
Write(s: string): void;
1423014234
WriteLine(s: string): void;
1423114235
Close(): void;
1423214236
}
1423314237

14238+
interface TextStreamBase {
14239+
/**
14240+
* The column number of the current character position in an input stream.
14241+
*/
14242+
Column: number;
14243+
/**
14244+
* The current line number in an input stream.
14245+
*/
14246+
Line: number;
14247+
/**
14248+
* Closes a text stream.
14249+
* It is not necessary to close standard streams; they close automatically when the process ends. If you close a standard stream, be aware that any other pointers to that standard stream become invalid.
14250+
*/
14251+
Close(): void;
14252+
}
14253+
14254+
interface TextStreamWriter extends TextStreamBase {
14255+
/**
14256+
* Sends a string to an output stream.
14257+
*/
14258+
Write(s: string): void;
14259+
/**
14260+
* Sends a specified number of blank lines (newline characters) to an output stream.
14261+
*/
14262+
WriteBlankLines(intLines: number): void;
14263+
/**
14264+
* Sends a string followed by a newline character to an output stream.
14265+
*/
14266+
WriteLine(s: string): void;
14267+
}
14268+
14269+
interface TextStreamReader extends TextStreamBase {
14270+
/**
14271+
* Returns a specified number of characters from an input stream, beginning at the current pointer position.
14272+
* Does not return until the ENTER key is pressed.
14273+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
14274+
*/
14275+
Read(characters: number): string;
14276+
/**
14277+
* Returns all characters from an input stream.
14278+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
14279+
*/
14280+
ReadAll(): string;
14281+
/**
14282+
* Returns an entire line from an input stream.
14283+
* Although this method extracts the newline character, it does not add it to the returned string.
14284+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
14285+
*/
14286+
ReadLine(): string;
14287+
/**
14288+
* Skips a specified number of characters when reading from an input text stream.
14289+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
14290+
* @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
14291+
*/
14292+
Skip(characters: number): void;
14293+
/**
14294+
* Skips the next line when reading from an input text stream.
14295+
* Can only be used on a stream in reading mode, not writing or appending mode.
14296+
*/
14297+
SkipLine(): void;
14298+
/**
14299+
* Indicates whether the stream pointer position is at the end of a line.
14300+
*/
14301+
AtEndOfLine: boolean;
14302+
/**
14303+
* Indicates whether the stream pointer position is at the end of a stream.
14304+
*/
14305+
AtEndOfStream: boolean;
14306+
}
14307+
1423414308
declare var WScript: {
14309+
/**
14310+
* Outputs text to either a message box (under WScript.exe) or the command console window followed by a newline (under CScript.ext).
14311+
*/
1423514312
Echo(s: any): void;
14236-
StdErr: ITextWriter;
14237-
StdOut: ITextWriter;
14313+
/**
14314+
* Exposes the write-only error output stream for the current script.
14315+
* Can be accessed only while using CScript.exe.
14316+
*/
14317+
StdErr: TextStreamWriter;
14318+
/**
14319+
* Exposes the write-only output stream for the current script.
14320+
* Can be accessed only while using CScript.exe.
14321+
*/
14322+
StdOut: TextStreamWriter;
1423814323
Arguments: { length: number; Item(n: number): string; };
14324+
/**
14325+
* The full path of the currently running script.
14326+
*/
1423914327
ScriptFullName: string;
14328+
/**
14329+
* Forces the script to stop immediately, with an optional exit code.
14330+
*/
1424014331
Quit(exitCode?: number): number;
14241-
}
14332+
/**
14333+
* The Windows Script Host build version number.
14334+
*/
14335+
BuildVersion: number;
14336+
/**
14337+
* Fully qualified path of the host executable.
14338+
*/
14339+
FullName: string;
14340+
/**
14341+
* Gets/sets the script mode - interactive(true) or batch(false).
14342+
*/
14343+
Interactive: boolean;
14344+
/**
14345+
* The name of the host executable (WScript.exe or CScript.exe).
14346+
*/
14347+
Name: string;
14348+
/**
14349+
* Path of the directory containing the host executable.
14350+
*/
14351+
Path: string;
14352+
/**
14353+
* The filename of the currently running script.
14354+
*/
14355+
ScriptName: string;
14356+
/**
14357+
* Exposes the read-only input stream for the current script.
14358+
* Can be accessed only while using CScript.exe.
14359+
*/
14360+
StdIn: TextStreamReader;
14361+
/**
14362+
* Windows Script Host version
14363+
*/
14364+
Version: string;
14365+
/**
14366+
* Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
14367+
*/
14368+
ConnectObject(objEventSource: any, strPrefix: string): void;
14369+
/**
14370+
* Creates a COM object.
14371+
* @param strProgiID
14372+
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
14373+
*/
14374+
CreateObject(strProgID: string, strPrefix?: string): any;
14375+
/**
14376+
* Disconnects a COM object from its event sources.
14377+
*/
14378+
DisconnectObject(obj: any): void;
14379+
/**
14380+
* Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
14381+
* @param strPathname Fully qualified path to the file containing the object persisted to disk. For objects in memory, pass a zero-length string.
14382+
* @param strProgID
14383+
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
14384+
*/
14385+
GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
14386+
/**
14387+
* Suspends script execution for a specified length of time, then continues execution.
14388+
* @param intTime Interval (in milliseconds) to suspend script execution.
14389+
*/
14390+
Sleep(intTime: number): void;
14391+
};

bin/lib.es6.d.ts

Lines changed: 154 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17205,19 +17205,169 @@ declare function importScripts(...urls: string[]): void;
1720517205
/// Windows Script Host APIS
1720617206
/////////////////////////////
1720717207

17208-
declare var ActiveXObject: { new (s: string): any; };
17208+
17209+
interface ActiveXObject {
17210+
new (s: string): any;
17211+
}
17212+
declare var ActiveXObject: ActiveXObject;
1720917213

1721017214
interface ITextWriter {
1721117215
Write(s: string): void;
1721217216
WriteLine(s: string): void;
1721317217
Close(): void;
1721417218
}
1721517219

17220+
interface TextStreamBase {
17221+
/**
17222+
* The column number of the current character position in an input stream.
17223+
*/
17224+
Column: number;
17225+
/**
17226+
* The current line number in an input stream.
17227+
*/
17228+
Line: number;
17229+
/**
17230+
* Closes a text stream.
17231+
* It is not necessary to close standard streams; they close automatically when the process ends. If you close a standard stream, be aware that any other pointers to that standard stream become invalid.
17232+
*/
17233+
Close(): void;
17234+
}
17235+
17236+
interface TextStreamWriter extends TextStreamBase {
17237+
/**
17238+
* Sends a string to an output stream.
17239+
*/
17240+
Write(s: string): void;
17241+
/**
17242+
* Sends a specified number of blank lines (newline characters) to an output stream.
17243+
*/
17244+
WriteBlankLines(intLines: number): void;
17245+
/**
17246+
* Sends a string followed by a newline character to an output stream.
17247+
*/
17248+
WriteLine(s: string): void;
17249+
}
17250+
17251+
interface TextStreamReader extends TextStreamBase {
17252+
/**
17253+
* Returns a specified number of characters from an input stream, beginning at the current pointer position.
17254+
* Does not return until the ENTER key is pressed.
17255+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
17256+
*/
17257+
Read(characters: number): string;
17258+
/**
17259+
* Returns all characters from an input stream.
17260+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
17261+
*/
17262+
ReadAll(): string;
17263+
/**
17264+
* Returns an entire line from an input stream.
17265+
* Although this method extracts the newline character, it does not add it to the returned string.
17266+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
17267+
*/
17268+
ReadLine(): string;
17269+
/**
17270+
* Skips a specified number of characters when reading from an input text stream.
17271+
* Can only be used on a stream in reading mode; causes an error in writing or appending mode.
17272+
* @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
17273+
*/
17274+
Skip(characters: number): void;
17275+
/**
17276+
* Skips the next line when reading from an input text stream.
17277+
* Can only be used on a stream in reading mode, not writing or appending mode.
17278+
*/
17279+
SkipLine(): void;
17280+
/**
17281+
* Indicates whether the stream pointer position is at the end of a line.
17282+
*/
17283+
AtEndOfLine: boolean;
17284+
/**
17285+
* Indicates whether the stream pointer position is at the end of a stream.
17286+
*/
17287+
AtEndOfStream: boolean;
17288+
}
17289+
1721617290
declare var WScript: {
17291+
/**
17292+
* Outputs text to either a message box (under WScript.exe) or the command console window followed by a newline (under CScript.ext).
17293+
*/
1721717294
Echo(s: any): void;
17218-
StdErr: ITextWriter;
17219-
StdOut: ITextWriter;
17295+
/**
17296+
* Exposes the write-only error output stream for the current script.
17297+
* Can be accessed only while using CScript.exe.
17298+
*/
17299+
StdErr: TextStreamWriter;
17300+
/**
17301+
* Exposes the write-only output stream for the current script.
17302+
* Can be accessed only while using CScript.exe.
17303+
*/
17304+
StdOut: TextStreamWriter;
1722017305
Arguments: { length: number; Item(n: number): string; };
17306+
/**
17307+
* The full path of the currently running script.
17308+
*/
1722117309
ScriptFullName: string;
17310+
/**
17311+
* Forces the script to stop immediately, with an optional exit code.
17312+
*/
1722217313
Quit(exitCode?: number): number;
17223-
}
17314+
/**
17315+
* The Windows Script Host build version number.
17316+
*/
17317+
BuildVersion: number;
17318+
/**
17319+
* Fully qualified path of the host executable.
17320+
*/
17321+
FullName: string;
17322+
/**
17323+
* Gets/sets the script mode - interactive(true) or batch(false).
17324+
*/
17325+
Interactive: boolean;
17326+
/**
17327+
* The name of the host executable (WScript.exe or CScript.exe).
17328+
*/
17329+
Name: string;
17330+
/**
17331+
* Path of the directory containing the host executable.
17332+
*/
17333+
Path: string;
17334+
/**
17335+
* The filename of the currently running script.
17336+
*/
17337+
ScriptName: string;
17338+
/**
17339+
* Exposes the read-only input stream for the current script.
17340+
* Can be accessed only while using CScript.exe.
17341+
*/
17342+
StdIn: TextStreamReader;
17343+
/**
17344+
* Windows Script Host version
17345+
*/
17346+
Version: string;
17347+
/**
17348+
* Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
17349+
*/
17350+
ConnectObject(objEventSource: any, strPrefix: string): void;
17351+
/**
17352+
* Creates a COM object.
17353+
* @param strProgiID
17354+
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
17355+
*/
17356+
CreateObject(strProgID: string, strPrefix?: string): any;
17357+
/**
17358+
* Disconnects a COM object from its event sources.
17359+
*/
17360+
DisconnectObject(obj: any): void;
17361+
/**
17362+
* Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
17363+
* @param strPathname Fully qualified path to the file containing the object persisted to disk. For objects in memory, pass a zero-length string.
17364+
* @param strProgID
17365+
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
17366+
*/
17367+
GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
17368+
/**
17369+
* Suspends script execution for a specified length of time, then continues execution.
17370+
* @param intTime Interval (in milliseconds) to suspend script execution.
17371+
*/
17372+
Sleep(intTime: number): void;
17373+
};

0 commit comments

Comments
 (0)