typescript2 nodejs 프로젝트 생성 : typescript, eslint, prettier 설정 ** nodejs 프로젝트 생성시 typescript 적용 1. nodejs 프로젝트 생성mkdir projectNamecd projectNamenpm init -ynpm i -D typescript ts-node nodemonnpx tsc --init 2. tsconfig.json 파일에 다음 내용 설정{..."target": "es6","module": "commonjs","outDir": "./dist","rootDir": "./src","strict": true,"moduleResolution": "node","esModuleInterop": true,...} 3. 프로젝트 루트에 dist와 src 폴더를 생성하고 src에 index.ts 파일 생성 4. packagejson에 다음 내용 설정{... 2024. 11. 13. enum to array enum EResouce_Filter_List_Type { shape = 'shape', square = 'square', image = 'image', movie = 'video', audio = 'audio', interacted = 'interacted', page = 'page', none = '', folder = 'folder',}const allList = Array.from(Object.values(EResouce_Filter_List_Type)); 2024. 6. 5. 이전 1 다음