<p dir="auto">Pretty much like the title says, private methods should stay private:</p>
<h3 dir="auto">input:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class NoRespect {
    private priv() {}
    pub() { return this.priv(); }
} "><pre class="notranslate"><code class="notranslate">class NoRespect {
    private priv() {}
    pub() { return this.priv(); }
} 
</code></pre></div>
<h3 dir="auto">actual output:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var NoRespect = (function () {
    function NoRespect() {}
    NoRespect.prototype.priv = function () { };
    NoRespect.prototype.pub = function () { return this.priv(); };
    return NoRespect;
})();"><pre class="notranslate"><code class="notranslate">var NoRespect = (function () {
    function NoRespect() {}
    NoRespect.prototype.priv = function () { };
    NoRespect.prototype.pub = function () { return this.priv(); };
    return NoRespect;
})();
</code></pre></div>
<h3 dir="auto">expected output:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var NoRespect = (function () {
    function NoRespect() {}
    var priv = function () { };
    NoRespect.prototype.pub = function () { priv.call(this); };
    return NoRespect;
})();"><pre class="notranslate"><code class="notranslate">var NoRespect = (function () {
    function NoRespect() {}
    var priv = function () { };
    NoRespect.prototype.pub = function () { priv.call(this); };
    return NoRespect;
})();
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="➜ tsc --version
message TS6029: Version 1.7.5"><pre class="notranslate"><code class="notranslate">➜ tsc --version
message TS6029: Version 1.7.5
</code></pre></div>
<p dir="auto">Currently private functions are put on the prototype of a function so they are not really private. I suggest adding them as normal functions in the scope of the class so that they are in fact only accessible to the class.</p>
<p dir="auto">Example</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module Example
{
    export class ExampleClass
    {
        method()
        {
            this.privateMethod();
        }
        private privateMethod()
        {
            console.log(&quot;private&quot;);
        }
    }
}"><pre class="notranslate"><code class="notranslate">module Example
{
    export class ExampleClass
    {
        method()
        {
            this.privateMethod();
        }
        private privateMethod()
        {
            console.log("private");
        }
    }
}
</code></pre></div>
<p dir="auto">would create</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var Example;
(function (Example) {
    var ExampleClass = (function () {
        function ExampleClass() {
        }
        function ExampleClass_privateMethod()
        {
            console.log(&quot;private&quot;);
        }
        ExampleClass.prototype.method = function () {
            privateMethod();
        };
        return ExampleClass;
    })();
    Example.ExampleClass = ExampleClass;
})(Example || (Example = {}));"><pre class="notranslate"><code class="notranslate">var Example;
(function (Example) {
    var ExampleClass = (function () {
        function ExampleClass() {
        }
        function ExampleClass_privateMethod()
        {
            console.log("private");
        }
        ExampleClass.prototype.method = function () {
            privateMethod();
        };
        return ExampleClass;
    })();
    Example.ExampleClass = ExampleClass;
})(Example || (Example = {}));
</code></pre></div>