일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Props
- bitcoin
- Interface
- solidity
- Redux
- node.js
- graphQL
- express.js
- typeScript
- API
- middleware
- error
- evm
- blockchain
- REACT
- nextJS
- concept
- tailwindcss
- SSR
- 삶
- CSS
- web
- HTML
- useState
- 기준
- hardhat
- Ethereum
- built in object
- JavaScript
- CLASS
- Today
- Total
목록전체 글 (375)
ReasonJun
Object: An object is a fundamental concept in JavaScript and is an instance of a particular class or a collection of key-value pairs. Objects can be created using object literals ({}), the Object() constructor, or by instantiating a class using the new keyword. const person = { name: 'John', age: 30, }; console.log(person.name); // Output: John In the example above, person is an object created u..
In TypeScript, the this keyword is used to refer to the current instance of an object or class within a method or function. It represents the context in which a function is called or an object is accessed. The behavior of this can vary depending on the context in which it is used. Let's explore some common scenarios: In Object Methods: When this is used inside a method of an object, it refers to..
Optional Attribute In TypeScript interfaces, you can make properties optional by using the ? symbol after the property name. An optional property allows you to define that a certain property may or may not be present in an object that implements the interface. This provides flexibility when working with objects that may have varying sets of properties. Here's an example that demonstrates the use..
In TypeScript, an interface is a way to define the structure and shape of an object. It describes the contract that an object must adhere to by specifying the names, types, and optional modifiers of its properties and methods. Interfaces play a crucial role in defining the shape of data and enabling type checking and static analysis in TypeScript. Here's an example of defining an interface in Ty..
In TypeScript, a type guard is a runtime check that allows you to narrow down the type of a value within a conditional block. Type guards enable you to make more precise type inferences based on certain conditions, improving type safety and enabling more expressive and reliable code. Type guards are particularly useful when working with union types or when the TypeScript compiler cannot determin..

In TypeScript, assertion (also known as type assertion or type casting) is a way to inform the TypeScript compiler about the type of a value when the compiler cannot infer it automatically. It allows you to override the default type inference and treat a value as a specific type, even if there is no obvious relationship between the original type and the asserted type. Type assertions are typical..
In TypeScript, type inference refers to the process by which the TypeScript compiler automatically determines the type of a value or expression based on its usage and context. TypeScript's type inference system analyzes the code and infers types for variables, function return values, and other expressions, reducing the need for explicit type annotations in many cases. Here are some key points ab..
/// 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..
Type annotations in TypeScript are used to explicitly specify the type of a variable, function parameter, return value, or any other entity in your code. They provide a way to declare the expected types and enforce type checking at compile-time, allowing you to catch type-related errors early in the development process. Type annotations are written using a syntax that resembles JavaScript, but w..
In TypeScript, the type keyword is used to define custom types or type aliases. It allows you to create reusable type annotations to represent different shapes of data, making your code more expressive and easier to understand. Here are the main ways in which the type keyword is used in TypeScript: Type Aliases: Type aliases allow you to create a new name for an existing type. They are helpful w..