const hello : string = "Hello World!"
interface User {
Name?: string;
Age: number;
Print(): any;
}
class Member {
Name: string;
Age: number;
constructor(name: string, age: number) {
this.Name = name;
this.Age = age;
}
Print() {
console.log(`${hello} ${this.Name}! You are !${this.Age} years old!`);
}
}
function PrintUser(u: User) {
u.Print();
}
PrintUser(new Member("Jason", 30));