According to this article, you can use TypeScript namespaces to import types/interfaces without including an import:
https://scotch.io/tutorials/3-useful-typescript-tips-for-angular
However if I create a namepsace:
export namespace ST {
export interface Ifoo {
}
}
in order to get it recognized, I have to import it like so:
import {ST} from 'suman-types/dts/foo';
export const foo : ST.Ifoo = function () {
};
is there something I am doing wrong? How can I use a namespace to easily import code?
Perhaps this only works with Angular and doesn't really work with CommonJS/Node.js? Not sure why not though.