Context
Guys, i'm starting with Typescript and right now i'm just struggling with some concepts.
When specifying a parameter to a function, for example, i set the type like that:
function example(test: string){...}
But right now i'm getting into states and i see types being specified like that:
type User = {
id: string;
name: string;
avatar: string;
}
const [user, setUser] = useState<User>();
Question
So my question is: What's the difference between : and <> ?