목록전체 글 (298)
\(@^0^@)/

- 알고리즘 leetcode 연결 리스트 1문제 아직도 연결 리스트라니... 하루에 적어도 한 문제씩 풀 수 있도록 노력하자! - 드림 코딩 TS 강의 클래스 생성자 함수 안에 속성?을 설정할 때 클래스 멤버 변수를 지우게 될 경우, type error가 발생한다. 무슨 말이냐면, 자바스크립트의 경우에는 아래와 같이 작성해도 에러가 나지 않지만, class GoodGreeter { constructor() { this.name = "hello"; } } 타입 스크립트의 경우에는 name property가 존재하지 않는다는 에러가 나타나는 것을 볼 수 있다. 그 이유는 타입 스크립트 이므로 지정해주지 않아서 당연히 에러가 나는 것. 따라서 타입 스크립트에서는 아래와 같이 타입 지정을 해주어야 한다. cla..

- 드림 코딩 REACT 강의 Deployment https://create-react-app.dev/docs/deployment Deployment | Create React App npm run build creates a build directory with a production build of your app. Set up your favorite HTTP server so that a visitor to your site is served index.html, and requests to static paths like /static/js/main..js are served with the contents of the /st create-react-app.dev CSS 전처리기, PostCSS..

- 제로베이스 TS 강의 Interface JavaScript에서는 존재하지 않는다. 객체의 타입을 정의하고 생김새를 가지도록 할 수 있다. TypeScript에서의 클래스 기능은 C#에서 유래된 것이 많다. 일부 기능은 TS에서만 존재하는 고유 문법으로 컴파일 후 사라진다. extends가 아닌 implements 키워드로 구현한다. 위에서 말했던 것처럼, 인터페이스는 JS에서 존재하지 않는 것을 볼 수 있다. Implements interface Fruits { name: string price: number discount(): void } interface Meat { name: string price: number typeOf: string } /* - interface의 설계를 구현한다. - ..