My goal is to create a User module with multiple classes such as UserDetail, UserResetPassword, and more.
These classes will have some common properties that need to be shared. One approach is to declare the properties in each class and initialize them individually.
Alternatively, I could use inheritance by declaring an interface:
export interface IUser {
UserID: string;
UserName: string;
}
Then implement this interface in the classes:
import {IUser} from './IUserDetail'
class UserInfo implements IUser {}
My question is: is this supported in TypeScript? If not, what are some workarounds to resolve this?