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
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -170,3 +170,64 @@ declare var WScript: {
170
170
*/
171
171
Sleep(intTime: number): void;
172
172
};
173
+
174
+
/*
175
+
* Allows enumerating over a COM collection, which may not have indexed item access
176
+
*/
177
+
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
180
+
*/
181
+
atEnd(): boolean;
182
+
/*
183
+
* Returns the current item in the collection
184
+
*/
185
+
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.
188
+
*/
189
+
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.
192
+
*/
193
+
moveNext(): void;
194
+
}
195
+
interfaceEnumeratorConstructor{
196
+
new<T>(collection: any): Enumerator<T>;
197
+
new(collection: any): Enumerator<any>;
198
+
}
199
+
declarevarEnumerator: EnumeratorConstructor;
200
+
201
+
/*
202
+
* Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions
203
+
*/
204
+
interfaceVBArray<T>{
205
+
/*
206
+
* Returns the number of dimensions (1-based).
207
+
*/
208
+
dimensions(): number;
209
+
/*
210
+
* 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
215
+
* @param dimension 1-based dimension (defaults to 1)
216
+
*/
217
+
lbound(dimension?: number): number;
218
+
/*
219
+
* Returns the largest available index for a given dimension
220
+
* @param dimension 1-based dimension (defaults to 1)
221
+
*/
222
+
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.
0 commit comments