The following code in a .ts file:
declare module '*.txt' {
const module: string
export default module
}
Does not work, giving error:
Invalid module name in augmentation, module '*.txt' cannot be found. ts(2664)
However, putting it in a .d.ts file does work as expected.
Is this intended, can I achieve the same in a .ts file rather than .d.ts?