// โญ๏ธ anonymous
// โญโโโโโโโโ anonymous โโโโโโโโโฎ
function greet(person: { name: string; age: number }) {
return "Hello " + person.name;
}
// โญ๏ธ interface
interface Person {
name: string;
age : number;
}
// โญ๏ธ type alias
type Person = {
name: string;
age : number;
};
// test run
function greet(person: Person) {
return "Hello " + person.name;
}