Encountering an issue when assigning an interface to an object in TypeScript.
I have defined two interfaces as shown below.
export interface UserInfo {
firstName: string,
lastName: string,
lastUpdateTime: string,
status: string
}
export interface User{
activeCount: string,
subsource: string,
users: UserInfo[]
}
Upon assigning the User interface to an object in a component, an error occurred.
user: User= {}; // Type {} is missing the properties
user: User;