mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
18 lines
231 B
TypeScript
18 lines
231 B
TypeScript
|
class A {
|
||
|
foo() {
|
||
|
return this;
|
||
|
}
|
||
|
}
|
||
|
class B extends A {
|
||
|
bar() {
|
||
|
return this;
|
||
|
}
|
||
|
}
|
||
|
class C extends B {
|
||
|
baz() {
|
||
|
return this;
|
||
|
}
|
||
|
}
|
||
|
var c: C;
|
||
|
var z = c.foo().bar().baz(); // Fluent pattern
|