Last active
November 23, 2022 06:34
-
-
Save ehsanghaffar/1aaad46464fa2b19475e005234785bb4 to your computer and use it in GitHub Desktop.
Typescript code snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const add = (a: number, b: number): number => a + b | |
add('1', '2') | |
// ❌ این ارور زیر رو برمیگردونه | |
// Argument of type 'string' is not assignable to parameter of type 'number'. ts(2345) | |
add(1, 2).replace('0', '*') | |
// ❌ این ارور زیر رو برمیگردونه | |
// Property 'replace' does not exist on type 'number'. ts(2339) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment