mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +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
|