<p dir="auto">Given the following code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="restoreState() {
    var iLastState = this.stateStack[ stateStack.length - 1 ];
    this.restoreState( iLastState );
}

restoreState( aState: TransformerState ) {
    this.state = aState
}"><pre class="notranslate"><code class="notranslate">restoreState() {
    var iLastState = this.stateStack[ stateStack.length - 1 ];
    this.restoreState( iLastState );
}

restoreState( aState: TransformerState ) {
    this.state = aState
}
</code></pre></div>
<p dir="auto">And the following call:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="popState() {
    var iState = this.stateStack.pop();
    this.restoreState( iState ); // Error on this line
}"><pre class="notranslate"><code class="notranslate">popState() {
    var iState = this.stateStack.pop();
    this.restoreState( iState ); // Error on this line
}
</code></pre></div>
<p dir="auto">The compiler complains:</p>
<p dir="auto"><code class="notranslate">error TS2346: Supplied parameters do not match any signature of call target.</code></p>
<p dir="auto">Language like C++ or JAVA support no argument function overloads; typescript seems not to.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto">Hi.</p>
<p dir="auto">I still have the error code TS1127 when I try to compile a file.<br>
I use the code from the quick tutorial.</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
// A self-contained demonstration of the problem follows...
function greeter(person: string){
    return &quot;Hello, &quot; + person;
}
var user = [0, 1, 2];
document.body.innerHTML = greeter(user);"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<span class="pl-k">function</span> <span class="pl-en">greeter</span><span class="pl-kos">(</span><span class="pl-s1">person</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s">"Hello, "</span> <span class="pl-c1">+</span> <span class="pl-s1">person</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">var</span> <span class="pl-s1">user</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">1</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-smi">document</span><span class="pl-kos">.</span><span class="pl-c1">body</span><span class="pl-kos">.</span><span class="pl-c1">innerHTML</span> <span class="pl-c1">=</span> <span class="pl-en">greeter</span><span class="pl-kos">(</span><span class="pl-s1">user</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">_greeter.ts(7,26):<em>Supplied parameters do not match any signature of call target</em></p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto"><em>greeter.ts(1,1): error TS1127: Invalid character.<br>
greeter.ts(1,2): error TS1127: Invalid character.<br>
greeter.ts(1,3): error TS1127: Invalid character.<br>
greeter.ts(1,4): error TS1127: Invalid character.</em></p>