TypeScript/tests/cases/conformance/types/thisType/fluentInterfaces.ts

12 lines
188 B
TypeScript
Raw Normal View History

2015-09-26 21:58:53 +02:00
interface A {
foo(): this;
}
interface B extends A {
bar(): this;
}
interface C extends B {
baz(): this;
}
var c: C;
var z = c.foo().bar().baz(); // Fluent pattern