Skip to content

Update Any.ts - #228

Open
Assaff1 wants to merge 1 commit into
microsoft:mainfrom
Assaff1:patch-1
Open

Assaff1 wants to merge 1 commit into
microsoft:mainfrom
Assaff1:patch-1

Conversation

@Assaff1

@Assaff1 Assaff1 commented Aug 25, 2024

Copy link
Copy Markdown

npx create-react-app my-app --template typescript

@Assaff1

Assaff1 commented Aug 25, 2024

Copy link
Copy Markdown
Author

function identity(arg: T): T {
return arg;
}

let numberIdentity = identity(42); // النوع هنا هو number
let stringIdentity = identity("Hello"); // النوع هنا هو string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant