TIL 107일차

김동현·2023년 3월 1일

TIL

목록 보기
85/93

타입스크립트 설치하는 방법

  1. yarn으로 설치
yarn add typescript
  1. 설치후 tsc명령어
tsc --init
  1. 위의 명령어 입력후 타입스크립트 셋팅이 완료된 파일(tsconfig.json)이 생성

혹시 zsh: command not found: tsc 이 뜰시해결방법

brew install typescript 입력하면 해결이 됩니다.

.ts 와 .tsx의 차이점

typescript 일땐 .ts javascript일땐 .js

react Componet javascript일땐 .jsx typescript일땐 .tsx 로 구분해줍니다.

profile
꺽이지 않는 마음

0개의 댓글