class Foo { bar() { return this; } } new Foo() .bar() .bar() .bar().bar().bar() .bar(); let biz = new Foo(); biz.bar() biz.bar().bar().bar()