Take a look at this file
src/@types/user.d.ts
declare global {
export interface IUser {
name: string;
age: number;
}
}
And in this file
game/user/user.ts
const object: IUser => {}
I get an error saying
Cannot find name 'IUser'.
How come it isn't working? I added the declare global {} around the interface. It should work no? I should be allowed to use it anywhere in my code without having to import it in.