TypeScript Types
Type annotations let the compiler check how values are used. TypeScript erases annotations when generating JavaScript.
TypeScript
function greet(name: string): string {
return `Hello, ${name}`;
}
console.log(greet("Ada"));Type annotations let the compiler check how values are used. TypeScript erases annotations when generating JavaScript.
function greet(name: string): string {
return `Hello, ${name}`;
}
console.log(greet("Ada"));