일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- web
- Interface
- middleware
- bitcoin
- solidity
- typeScript
- built in object
- REACT
- error
- evm
- blockchain
- CLASS
- graphQL
- nextJS
- API
- node.js
- Ethereum
- Props
- concept
- hardhat
- Redux
- 삶
- express.js
- HTML
- SSR
- JavaScript
- 기준
- useState
- CSS
- tailwindcss
- Today
- Total
목록never (3)
ReasonJun
The "not assignable to parameter of type never" error in TypeScript occurs when you try to assign a value of a type that is not never to a parameter of type never. The never type is a special type in TypeScript that represents a value that can never occur. This means that any attempt to assign a value of type never to a parameter of type never will result in an error. For example, the following ..
The void type is used to represent functions that do not return a value. This is typically used for functions that have side effects, such as logging or printing to the console. For example: function logMessage(message: string): void { console.log(message); } const result = logMessage("Hello, world!"); // The result of this function is void The never type is used to represent functions that neve..
/// Any // All types are possible. However, in this case, there is no reason to use typescript, so it is rarely used. let hello3: any = 'Hello world' hello3 = 123 hello3 = false hello3 = null hello3 = {} hello3 = [] hello3= function () {} /// Unknown const z: any = 123 const u: unknown = 123 // When z is changed to u, all errors occur except for 'any'. // In other words, it is better to use 'unk..