interface initialStateInterface {
user: object;
age: number;
}
const initialState = {
user: { username: "", email: "" },
age: 0,
};
In this code snippet, I have defined an interface type for the initial state containing a user object and an age number. Is there a way to assign specific types to the elements of the user object?
What I'm attempting to achieve is,
user: (username: string,email: string).