<p dir="auto">Does anyone thought about adding support for fluent API (something similar/same as Dart does)?</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
  k = 10;
  constructor(private n) {
  }

  run(): void { ... }

  test(): void { ... }
}

new A(2)
  ..k = 20
  ..run()
  ..test();"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
  <span class="pl-c1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span>
  <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-k">private</span> <span class="pl-s1">n</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-kos">}</span>

  <span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>

  <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">new</span> <span class="pl-smi">A</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span>
  <span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-c1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span>
  <span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">this could be translated to:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var a = new A(2);
a.k = 20;
a.run();
a.test();"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">A</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-c1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span><span class="pl-kos">;</span>
<span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">That would simplify a lot writing A class in a way fluent API is supported.</p>
<p dir="auto">With <code class="notranslate">noImplicitAny: true</code> set, the following should fail, but it doesn't:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const x = ({ f }) =&gt; 1;"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-en">x</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> f <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">1</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">TS 1.8.7</p>