// 5. type alias vs. interface // 5-1. function interface IFunction { (name: string, age?: number): void; } type tFunction = (name: string, age?: number) => void; // 5-2. array type tArray = string[]; interface IArray { [index: number]: string; } // 5-3. intersection interface ErrorHandling { success: boolean; error?: { message: string }; } interface ArtistData { artists: { name: string }[]; } t..
// 1. class implements interfaceå interface IPerson { name: string; age?: number; hello(): void; } class Person implements IPerson { name: string; constructor(name: string) { this.name = name; } hello(): void { console.log(`안녕하세요. ${this.name}입니다.`); } } const person: IPerson = new Person('Hyun'); person.hello(); // 2. interface extends interface interface IKorean extends IPerson { city:..
interface Person { name: string; age?: number; hello(): void; } const p1: Person = { name: "hyun", hello: function (): void { console.log(`Hi, my name is ${this.name}`); }, }; const p2: Person = { name: "kim", hello(): void { console.log(`Hi, my name is ${this.name}`); }, };
// optional property 1 interface Person { name: string; age?: number; } const hello = (p: Person): void => { console.log(`안녕하세요. 제 이름은 ${p.name}이고 나이는 ${p.age}입니다.`); }; const p1: Person = { name: "hyun" }; const p2: Person = { name: "kim", age: 32 }; hello(p1); hello(p2); // optional property 2 // indexable type interface Person1 { name: string; age: number; [index: string]: string | number; } ..
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.11; interface PocketWrapper { struct Item { string name; uint256 price; } function addItem(string memory _name, uint256 _price) external; function getItem(uint256 _index) external view returns (Item memory _item); } contract Pocket is PocketWrapper { Item[] public items; function addItem(string memory _name, uint256 _price) public override ..
- Total
- Today
- Yesterday
- ethers.js
- Proxy Pattern
- caver.js
- 스마트 컨트랙트
- 앱 아이콘
- interface
- ganache
- class
- avalanchego
- 이더리움
- Truffle
- web3
- Call
- JWT
- eslint
- Android
- 블록체인
- swr
- web3-token
- erc20
- 블록 탐색기
- caver-js
- ERC721
- Upgradeable Contracts
- web3.js
- nft
- Flutter
- metamask-extension
- typescript
- Hardhat
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |