일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Ethereum
- 삶
- web
- REACT
- HTML
- Interface
- tailwindcss
- API
- CLASS
- error
- built in object
- CSS
- 기준
- evm
- Props
- Redux
- nextJS
- middleware
- bitcoin
- graphQL
- express.js
- JavaScript
- typeScript
- solidity
- hardhat
- node.js
- useState
- SSR
- blockchain
- concept
- Today
- Total
목록전체 글 (369)
ReasonJun
In TypeScript, a module is a way to organize code into separate files and encapsulate its functionality. Modules allow you to define and export reusable pieces of code, such as classes, functions, interfaces, or variables, and import them in other parts of your program. TypeScript supports two main module systems: CommonJS and ECMAScript (ES) modules. CommonJS Modules: CommonJS modules are prima..
Generics in TypeScript allow you to create reusable components or functions that can work with different types. They provide a way to define placeholders for types that are determined by the user of the component or function. Generic types are defined using angle brackets () and can be applied to classes, interfaces, functions, and type aliases. Here's an example of defining a generic function: ..
In TypeScript, access modifiers are keywords that determine the accessibility of class members (properties and methods) from outside the class. TypeScript provides three access modifiers: public, private, and protected. These access modifiers control how class members can be accessed and modified. Here's an overview of each access modifier: public: The public access modifier allows class members..
In TypeScript, function overloading refers to the ability to define multiple function signatures for the same function name. This allows a function to accept different sets of arguments or have different return types based on the provided function signature. Function overloading enables you to provide different ways to call a function while maintaining type safety and clarity. It helps in creati..
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..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cHVrC6/btsjlEruMEk/GHe9UVKXYDjF4RZalzUBlk/img.png)
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..