TypeScript(타입스크립트) 5

TypeScript(타입스트립트) - 기본 설정 방법

1.Visual studio code 다운로드 https://code.visualstudio.com/download Download Visual Studio Code - Mac, Linux, Windows Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications. code.visualstudio.com 2. VS Code Extension 설치(추가..

undefined와 null의 차이점을 설명하세요

undefined은 변수를 선언하고 값을 할당하지 않은 상태, null은 변수를 선언하고 빈 값을 할당한 상태(빈 객체)이다. 즉, undefined는 자료형이 없는 상태이다. 따라서 typeof를 통해 자료형을 확인해보면 null은 object로, undefined는 undefined가 출력되는 것을 확인할 수 있다. 한마디로 null 이라도 할당을 하고 안하고의 차이 typeof null // 'object' typeof undefined // 'undefined' null === undefined // false null == undefined // true null === null // true null == null // true !null // true isNaN(1 + null) // fal..

타입스트립트 + 리액트(TypeScript + React) 설치 및 기본

react-board-typescript 는 프로젝트 명이고, – -template typescript는 타입스크립트를 적용하라는 옵션 npx create-react-app react-board-typescript --template typescript 프로젝트의 모든 정보를 갖고 있는 package.json이다. 의존성 라이브러리의 정보는 package.json에 저장되어있고 해당 모듈은 node_modules에 저장되어있다. typescript에 대한 설정은 tsconfig.json 에 설정되어있다.

타입스크립트(TypeScript) 개요

타입스크립트의 특징 - 자바스크립트는 동적 타입의 인터프리터 언어로 런타임에서 오류를 발견. -타입스크립트는 정적 타입의 컴파일 언어이며 타입스크립트 컴파일러 또는 바벨(Babel)을 통해 자바스크립트 코드로 변환 객체 지향 프로그래밍 지원 타입스크립트는 ES6(ECMAScript 6)에서 새롭게 사용된 문법을 포함하고 있으며 클래스, 인터페이스, 상속, 모듈 등과 같은 객체 지향 프로그래밍 패턴을 제공합니다. 자바스크립트 호환 타입스크립트는 자바스크립트와 100% 호환됩니다. 높은 수준의 코드 탐색과 디버깅 타입스크립트는 코드에 목적을 명시하고 목적에 맞지 않는 타입의 변수나 함수들에서 에러를 발생시켜 버그를 사전에 제거합니다. 또한 코드 자동완성이나 실행 전 피드백을 제공하여 작업과 동시에 디버깅이 ..