initial commit
This commit is contained in:
24
test_data/test.ts
Normal file
24
test_data/test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
interface Person {
|
||||
name: string;
|
||||
age: number;
|
||||
email: string;
|
||||
}
|
||||
|
||||
function greet(person: Person): string {
|
||||
return `Hello, ${person.name}! You are ${person.age} years old.`;
|
||||
}
|
||||
|
||||
const user: Person = {
|
||||
name: "Alice",
|
||||
age: 30,
|
||||
email: "alice@example.com",
|
||||
};
|
||||
|
||||
console.log(greet(user));
|
||||
console.log(`Email: ${user.email}`);
|
||||
|
||||
function calculateSum(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
console.log(`Sum of 5 and 10 is: ${calculateSum(5, 10)}`);
|
||||
Reference in New Issue
Block a user