[Typescript] Creating Custom Types
·
Web/Nodejs
When Create Custom Type? Program has complex data structures Basic tyeps (primitive types) don't describe completely the data structures I'm using When creating Library Cooperation with others and needing define new class, interface etc.. How To Make Custom Type Syntax? Use `type` keyword! How to use it smartly? 보통 `types.d.ts` 파일로 타입을 정의하는 것이 국룰이다. 1. *.d.ts 타입 정의 2. import {타입명} from '*.d.ts' ..