@@ -201,10 +201,18 @@ declare var WScript: {
201201 Sleep ( intTime : number ) : void ;
202202} ;
203203
204+ /**
205+ * Represents an Automation SAFEARRAY
206+ */
207+ declare class SafeArray < T = any > {
208+ private constructor ( ) ;
209+ private SafeArray_typekey : SafeArray < T > ;
210+ }
211+
204212/**
205213 * Allows enumerating over a COM collection, which may not have indexed item access.
206214 */
207- interface Enumerator < T > {
215+ interface Enumerator < T = any > {
208216 /**
209217 * Returns true if the current item is the last one in the collection, or the collection is empty,
210218 * or the current item is undefined.
@@ -230,16 +238,16 @@ interface Enumerator<T> {
230238}
231239
232240interface EnumeratorConstructor {
233- new < T > ( collection : any ) : Enumerator < T > ;
234- new ( collection : any ) : Enumerator < any > ;
241+ new < T = any > ( safearray : SafeArray < T > ) : Enumerator < T > ;
242+ new < T = any > ( collection : any ) : Enumerator < T > ;
235243}
236244
237245declare var Enumerator : EnumeratorConstructor ;
238246
239247/**
240248 * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
241249 */
242- interface VBArray < T > {
250+ interface VBArray < T = any > {
243251 /**
244252 * Returns the number of dimensions (1-based).
245253 */
@@ -271,16 +279,18 @@ interface VBArray<T> {
271279}
272280
273281interface VBArrayConstructor {
274- new < T > ( safeArray : any ) : VBArray < T > ;
275- new ( safeArray : any ) : VBArray < any > ;
282+ new < T = any > ( safeArray : SafeArray < T > ) : VBArray < T > ;
276283}
277284
278285declare var VBArray : VBArrayConstructor ;
279286
280287/**
281288 * Automation date (VT_DATE)
282289 */
283- interface VarDate { }
290+ declare class VarDate {
291+ private constructor ( ) ;
292+ private VarDate_typekey : VarDate ;
293+ }
284294
285295interface DateConstructor {
286296 new ( vd : VarDate ) : Date ;
0 commit comments