Skip to content

Commit 735fd1c

Browse files
committed
update typescript mx interface
1 parent ea4b11f commit 735fd1c

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

build/multiplex.d.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,19 +2570,26 @@ declare function mx(str: string): IEnumerable<string>
25702570
* Defines an enumerator, which supports an iteration over the specified Generator function.
25712571
* @param func A Generator function.
25722572
*/
2573-
declare function mx<T>(func: () => (yielder: (value: T) => any) => void): IEnumerable<T>
2573+
declare function mx<T>(func: () => (yielder: (value: T) => T) => any): IEnumerable<T>
25742574

25752575

25762576
/**
25772577
* Defines an enumerator, which supports an iteration over the items of the specified Array-like object.
25782578
* An Array-like object is an object which has the "length" property, eg. arguments, jQuery
25792579
* @param obj An Array-like object.
25802580
*/
2581-
declare function mx<T>(obj: { length: Number }): IEnumerable<T>
2581+
declare function mx<T>(obj: { length: Number; [index: number]: T }): IEnumerable<T>
2582+
2583+
2584+
/**
2585+
* Defines an enumerator, which supports an iteration over the arguments local variable available within all functions.
2586+
* @param obj arguments local variable available within all functions.
2587+
*/
2588+
declare function mx(obj: IArguments): IEnumerable<any>
25822589

25832590

25842591
/**
25852592
* Defines an enumerator, which supports an iteration over the properties of the specified object.
25862593
* @param obj A regular Object.
25872594
*/
2588-
declare function mx<T>(obj: Object): IEnumerable<KeyValuePair<string, T>>
2595+
declare function mx(obj: Object): IEnumerable<KeyValuePair<string, any>>

src/typescript/multiplex.d.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,19 +2570,26 @@ declare function mx(str: string): IEnumerable<string>
25702570
* Defines an enumerator, which supports an iteration over the specified Generator function.
25712571
* @param func A Generator function.
25722572
*/
2573-
declare function mx<T>(func: () => (yielder: (value: T) => any) => void): IEnumerable<T>
2573+
declare function mx<T>(func: () => (yielder: (value: T) => T) => any): IEnumerable<T>
25742574

25752575

25762576
/**
25772577
* Defines an enumerator, which supports an iteration over the items of the specified Array-like object.
25782578
* An Array-like object is an object which has the "length" property, eg. arguments, jQuery
25792579
* @param obj An Array-like object.
25802580
*/
2581-
declare function mx<T>(obj: { length: Number }): IEnumerable<T>
2581+
declare function mx<T>(obj: { length: Number; [index: number]: T }): IEnumerable<T>
2582+
2583+
2584+
/**
2585+
* Defines an enumerator, which supports an iteration over the arguments local variable available within all functions.
2586+
* @param obj arguments local variable available within all functions.
2587+
*/
2588+
declare function mx(obj: IArguments): IEnumerable<any>
25822589

25832590

25842591
/**
25852592
* Defines an enumerator, which supports an iteration over the properties of the specified object.
25862593
* @param obj A regular Object.
25872594
*/
2588-
declare function mx<T>(obj: Object): IEnumerable<KeyValuePair<string, T>>
2595+
declare function mx(obj: Object): IEnumerable<KeyValuePair<string, any>>

0 commit comments

Comments
 (0)