I am currently working on creating a lookup table for some static data by defining an object in a TypeScript file:
newTSFile.ts
export declare module FontList {
export DEFAULT_DATA: {
'james': {
'age': '23'
},
'jack': {
'age': '22'
}
}
}
When I try to import this in my main TypeScript file, I use the following syntax:
import { FontList } from './newTSFile';
//
console.log("font list: ", FontList)
However, during compilation, I encounter the error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module .../FontList
.
I am unsure about what mistake I might be making in the import process.