Skip to content

Commit 4bd6c5c

Browse files
committed
lambda generic overloads
1 parent 30d511c commit 4bd6c5c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/typescript/multiplex.d.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,28 @@ declare module mx {
8080
* Creates A function expression from the specified string lambda expression
8181
* @param exp String lambda expression.
8282
*/
83-
function lambda<T>(exp: string): (...args: any[]) => T;
83+
function lambda<T, TResult>(exp: string): (obj: T) => TResult;
84+
85+
86+
/**
87+
* Creates A function expression from the specified string lambda expression
88+
* @param exp String lambda expression.
89+
*/
90+
function lambda<T1, T2, TResult>(exp: string): (obj1: T1, obj2: T2) => TResult;
91+
92+
93+
/**
94+
* Creates A function expression from the specified string lambda expression
95+
* @param exp String lambda expression.
96+
*/
97+
function lambda<T1, T2, T3, TResult>(exp: string): (obj1: T1, obj2: T2, obj3: T3) => TResult;
98+
99+
100+
/**
101+
* Creates A function expression from the specified string lambda expression
102+
* @param exp String lambda expression.
103+
*/
104+
function lambda<TResult>(exp: string): (...args: any[]) => TResult;
84105

85106

86107
/**

0 commit comments

Comments
 (0)