How to define an opaque type in TypeScript? : <p>If I recall correctly, in C++ you can define an an opaque type like this ...</p>

<pre><code>class Foo;
</code></pre>

<p>... and use it like a handle e.g. when declaring function signatures ...</p>

<pre><code>void printFoo(const Foo&amp; foo);
</code></pre>

<p>Application code might then work with references-to-Foo or pointers-to-Foo without seeing the actual definition of Foo.</p>

<p>Is there anything similar in TypeScript -- how would you define an opaque type?</p>

<p>My problem is that if I define this ...</p>

<pre><code>interface Foo {};
</code></pre>

<p>... then that's freely interchangeable with other similar types. Is there an idiom?</p>
