<p dir="auto">Hi,<br>
Why don't implemented internal class in typescript?</p>
<p dir="auto">Element.ts:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="namespace Library {
    export class Element {
        //....
    }
}"><pre class="notranslate"><code class="notranslate">namespace Library {
    export class Element {
        //....
    }
}
</code></pre></div>
<p dir="auto">SelectElement.ts:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="namespace Library{
    export class SelectElement extends Element {
        //....
    }
}"><pre class="notranslate"><code class="notranslate">namespace Library{
    export class SelectElement extends Element {
        //....
    }
}
</code></pre></div>
<p dir="auto">Program.ts:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="namespace Library{
    export class Program {
        var selectElement = new Library.SelectElement();
        var element = new Library.Element();
    }
}"><pre class="notranslate"><code class="notranslate">namespace Library{
    export class Program {
        var selectElement = new Library.SelectElement();
        var element = new Library.Element();
    }
}
</code></pre></div>
<p dir="auto">If i put to export keyword before Element class, other developer can access to Element class, but i remove export keyword i don't use Element class in Library namespace. Does internal class will be able to use now or next version?</p>
<p dir="auto">Currently to protect integrity of data one can only use classes with private or protected fields. Classes are harder to work with compared to object literals. Being able to specify that certain fields are invisible to outside modules would be a valuable addition to support programming in functional style in TypeScript.</p>
<p dir="auto">So what I am suggesting is to be able to specify whether a field of an interface is exported from a module or not. This also means that the instance of such interface can only be created within the module it is declared.</p>
<p dir="auto">The similar features can be found in:</p>
<ul dir="auto">
<li>F# called <code class="notranslate">signature files</code>: <a href="http://msdn.microsoft.com/en-us/library/dd233196.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd233196.aspx</a></li>
<li>Haskell called <code class="notranslate">export lists</code>: <a href="http://www.haskell.org/onlinereport/modules.html" rel="nofollow">http://www.haskell.org/onlinereport/modules.html</a></li>
</ul>