언어/자바스크립트
-
왜 타입스크립트는 환영받는가? (feat.타입과 에러)언어/자바스크립트 2023. 12. 25. 23:46
🎉 타입스크립트를 왜 써야하는가를 살펴보다가 JS의 에러에 관한 이야기로 흘러들어와버렸다.. 타입스크립트 문법을 배우기에 앞서, 자바스크립트의 수퍼셋이라고 하는데 무엇이 나아졌길래 사람들에게 사랑받는걸까? 찾아보니 가장 먼저 눈에 띄는 부분은 runtime error가 발생하지 않도록 개발단계에서 error를 처리할 수 있게 해준다는 거 같은데... 뭔가 확 와닿지 않았다. 런타임 에러? 왜 발생하면 안되는거야? 👀 프로그래밍을 하면서 에러는 나의 프로젝트의 진행을 방해하고, try-catch 구문으로 처리하는 것들이라고만 생각했지, 그 이상 생각해보지 않았던 것 같다.. 런타임이란 무엇인가 간단하게 생각하면, 프로그램이 실행되는 환경을 이야기한다. JS를 다루는 사람들에게 런타임 환경은 browser나..