250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- REACT
- concept
- express.js
- 기준
- bitcoin
- CSS
- solidity
- SSR
- blockchain
- JavaScript
- evm
- graphQL
- web
- CLASS
- nextJS
- node.js
- tailwindcss
- Ethereum
- hardhat
- useState
- error
- API
- HTML
- Props
- 삶
- Redux
- built in object
- Interface
- middleware
- typeScript
Archives
- Today
- Total
목록type assertion (1)
ReasonJun
Typescript : When I use 'type annotation', 'type inference', 'type assertion' in typescript
If typescript cannot infer the type and need to do type annotation 1. In case of unilaterally returning any type const json = '{"x": 1, "y": 2}'; const coordinates = JSON.parse(json); console.log(coordinates); 2. If you declare a variable first and initialize it later => In this case, it is inferred as any. let greeting greeting = 'hello' // let greeting: any 3. When the value to be assigned to ..
Frontend/Typescript
2023. 6. 17. 16:51