mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
382 B
TypeScript
21 lines
382 B
TypeScript
//// [tests/cases/conformance/types/thisType/fluentInterfaces.ts] ////
|
|
|
|
//// [fluentInterfaces.ts]
|
|
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
|
|
|
|
|
|
//// [fluentInterfaces.js]
|
|
"use strict";
|
|
var c;
|
|
var z = c.foo().bar().baz(); // Fluent pattern
|