I am attempting to include a .d.ts file for an existing js file.
The type.js
file looks like this:
// type.js
export default {
NORMAL: '001',
CHECK: '002',
};
Now, I have added a type.d.ts
file as follows:
// type.d.ts
declare namespace col_type {
const NORMAL: string;
const CHECK: string;
}
However, when I import type.js
in my project, VSCode displays an error like this:
import TYPE from './type';
The error message reads:
File './type.d.ts' is not a module.
I am finding it difficult to understand what steps I need to take to resolve this issue.