TypeScript/tests/cases/compiler/inferentialTypingObjectLiteralMethod1.ts
2015-05-28 16:02:38 -07:00

5 lines
196 B
TypeScript

interface Int<T, U> {
method(x: T): U;
}
declare function foo<T, U>(x: T, y: Int<T, U>, z: Int<U, T>): T;
foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } });