You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib/scriptHost.d.ts
+43-25Lines changed: 43 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ interface TextStreamBase {
27
27
Line: number;
28
28
/**
29
29
* Closes a text stream.
30
-
* 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.
30
+
* It is not necessary to close standard streams; they close automatically when the process ends. If
31
+
* you close a standard stream, be aware that any other pointers to that standard stream become invalid.
* Outputs text to either a message box (under WScript.exe) or the command console window followed by a newline (under CScript.ext).
92
+
* Outputs text to either a message box (under WScript.exe) or the command console window followed by
93
+
* a newline (under CScript.ext).
92
94
*/
93
95
Echo(s: any): void;
94
96
/**
@@ -159,7 +161,8 @@ declare var WScript: {
159
161
DisconnectObject(obj: any): void;
160
162
/**
161
163
* Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
162
-
* @param strPathname Fully qualified path to the file containing the object persisted to disk. For objects in memory, pass a zero-length string.
164
+
* @param strPathname Fully qualified path to the file containing the object persisted to disk.
165
+
* For objects in memory, pass a zero-length string.
163
166
* @param strProgID
164
167
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
165
168
*/
@@ -171,63 +174,78 @@ declare var WScript: {
171
174
Sleep(intTime: number): void;
172
175
};
173
176
174
-
/*
175
-
* Allows enumerating over a COM collection, which may not have indexed item access
177
+
/**
178
+
* Allows enumerating over a COM collection, which may not have indexed item access.
176
179
*/
177
180
interfaceEnumerator<T>{
178
-
/*
179
-
* Returns true if the current item is the last one in the collection, or the collection is empty, or the current item is undefined
181
+
/**
182
+
* Returns true if the current item is the last one in the collection, or the collection is empty,
183
+
* or the current item is undefined.
180
184
*/
181
185
atEnd(): boolean;
182
-
/*
186
+
187
+
/**
183
188
* Returns the current item in the collection
184
189
*/
185
190
item(): T;
186
-
/*
187
-
* Resets the current item in the collection to the first item. If there are no items in the collection, the current item is set to undefined.
191
+
192
+
/**
193
+
* Resets the current item in the collection to the first item. If there are no items in the collection,
194
+
* the current item is set to undefined.
188
195
*/
189
196
moveFirst(): void;
190
-
/*
191
-
* Moves the current item to the next item in the collection. If the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined.
197
+
198
+
/**
199
+
* Moves the current item to the next item in the collection. If the enumerator is at the end of
200
+
* the collection or the collection is empty, the current item is set to undefined.
192
201
*/
193
202
moveNext(): void;
194
203
}
204
+
195
205
interfaceEnumeratorConstructor{
196
206
new<T>(collection: any): Enumerator<T>;
197
207
new(collection: any): Enumerator<any>;
198
208
}
209
+
199
210
declarevarEnumerator: EnumeratorConstructor;
200
211
201
-
/*
202
-
* Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions
212
+
/**
213
+
* Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
203
214
*/
204
215
interfaceVBArray<T>{
205
-
/*
216
+
/**
206
217
* Returns the number of dimensions (1-based).
207
218
*/
208
219
dimensions(): number;
209
-
/*
220
+
221
+
/**
210
222
* Takes an index for each dimension in the array, and returns the item at the corresponding location.
* Returns the smallest available index for a given dimension
225
+
226
+
/**
227
+
* Returns the smallest available index for a given dimension.
215
228
* @param dimension 1-based dimension (defaults to 1)
216
229
*/
217
230
lbound(dimension?: number): number;
218
-
/*
219
-
* Returns the largest available index for a given dimension
231
+
232
+
/**
233
+
* Returns the largest available index for a given dimension.
220
234
* @param dimension 1-based dimension (defaults to 1)
221
235
*/
222
236
ubound(dimension?: number): number;
223
-
/*
224
-
* Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, each successive dimension is appended to the end of the array.
225
-
* [[1,2,3],[4,5,6]] => [1,2,3,4,5,6]
237
+
238
+
/**
239
+
* Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
240
+
* each successive dimension is appended to the end of the array.
0 commit comments