mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 22:08:02 +00:00
create_file_with_ai
# Path: step_1/for_each/if_else/if/create_file_with_ai # UUID: d0268325-7348-448a-9134-27adbaad4fd1 # Changed files: example/README.md
This commit is contained in:
parent
5b16aedf27
commit
e03fd19b9f
1 changed files with 27 additions and 0 deletions
27
example/README.md
Normal file
27
example/README.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
// README.ts
|
||||
|
||||
/**
|
||||
* This is an example TypeScript file created based on the name of the file `README.md`.
|
||||
* It demonstrates basic TypeScript syntax and functionality.
|
||||
*/
|
||||
|
||||
// Define an interface for a User
|
||||
interface User {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
// Create a function to greet a user
|
||||
function greetUser(user: User): string {
|
||||
return `Hello, ${user.name}! Welcome to our system.`;
|
||||
}
|
||||
|
||||
// Example usage
|
||||
const exampleUser: User = {
|
||||
id: 1,
|
||||
name: "John Doe",
|
||||
email: "john.doe@example.com"
|
||||
};
|
||||
|
||||
console.log(greetUser(exampleUser));
|
Loading…
Add table
Reference in a new issue