Just starting out with TypeScript and encountering a simple issue. I'm attempting to import a file in order to bring in an interface. Here's an example:
Parent:
import { User } from "@/Users";
export interface Gift {
id: number;
user: User;
created_at: Date,
updated_at: Date
}
Child (User.ts):
export interface User {
id: string;
first_name: string,
last_name: string,
email: string,
created_at: string,
updated_at: string
}
This is resulting in an error
File 'somepathhere/Users.ts' is not considered a module
In my situation, Users.ts only contains this interface and nothing else, while the parent component has other functions but for now is only utilizing the User interface.