Toy Project/TypeScript로 블록체인 만들기 3

Typescript로 블록체인 만들기

블록체인 간단하게 : 블록의 연결 Creating a Block 1. 블록 구조 생성 class Block { public index: number; public hash: string; public previousHash: string; public data: string; public timestamp: number; constructor( index: number, hash: string, previousHash: string, data: string, timestamp: number ) { this.index = index; this.hash = hash; this.previousHash = previousHash; this.data = data; this.timestamp = timestamp;..

Typescript TSC-Watch, Interfaces, Classes

TSC-Watch 1. yarn add tsc-watch --dev 2. package.json 수정 https://github.com/chasonghui/typechain/commit/4a8223a916d0425dfad0c32066b2fa0c3b7d9371 types in typescript · chasonghui/typechain@4a8223a Permalink This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. Browse files types in typescript Loading branch information Showing 6 changed ..

Typescript Settings 타입스크립트 초기설정

Typescript Typescript : 프로그래밍 언어, Javascript 의 subrest, 컴파일할때 javascript로 변함. 자바스크립트는 너무 자유분방, type은 언어가 예측가능하고 읽기쉬움 자바스크립트의 upgrade version Setting Typescript up 작성시 환경 : vscode, window, 쉘: gitbash 1. yarn init 또는 npm init 초기화 명령을 통해 package.json을 생성한다. 2. yarn global add typescript 3. tsconfig.json 생성 typescript 에게 어떻게 javascript로 변환하는지 알려줌, 옵션설정 4. index.ts 생성 명령어 tsc : ts파일에 있는 코드를 컴파일해서 ind..