For my Meteor app using Angular 2, I am looking to create a custom data type like the one below:
interface MyCustomType {
index: number;
value: string;
}
To use this custom type across multiple files, I attempted to create a separate file named "mycustom.type.ts" with the following content:
export interface MyCustomType {
index: number;
value: string;
}
When trying to import this type for use in another file, I ran into an error in Atom:
TS Error File '/.../mycustom.type.ts' is not a module ...
What is the correct way to declare and import types so that they are accessible in various parts of the project?