SnipZard
Search snippets
Home
Portfolio
Contact
Type Alias
A type alias is used to create custom types in TypeScript.
Snippet:
type
MyType
=
string
|
number
;
Copy Code
Example:
type
User
=
{
name
:
string
;
age
:
number
;
}
Copy Code