![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/6Eaja/btrhRPav4F8/2q02RgZaE8EAD79lHKPbR1/img.png)
Goal - Typescript에서 interface와 타입별칭으로 타입을 정의한 변수의 프리뷰비교. - 프리뷰가 다른 이유 탐구. Typescript에서는 타입을 선언하는 두 가지 방식이 있다. 타입별칭과 인터페이스인데, 타입별칭으로 선언한 객체의 타입의 경우는 프리뷰를 보여줄 때 해당 객체 프로퍼티의 타입들을 보여주는 반면 인터페이스는 그렇지 않다. ex) 타입별칭 ex) 인터페이스 인터페이스의 확장성으로 인해 업무시에 인터페이스로 타입을 선언하는 경우가 대부분인데, 다른 개발자분들이 선언한 인터페이스의 타입을 프리뷰로 볼때 프로퍼티의 타입들을 볼 수 없어서 불편한 적이 많았다. 근데 그렇게 하지 않는 이유가 궁금했고 검색해보았는데 다음과 같은 글이 있었다 ( https://stackoverflow...
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/23ZHN/btrhN4L983N/fYN9aW9WdHorkY29anPaNK/img.png)
Goal - 일반적인 프로그램의 실행과정을 알아본다. - typescript로 작성된 프로그램의 실행 과정을 알아본다. 1. 일반적인 프로그램의 실행 과정 1. 프로그래머가 코드 작성 (프로그램) 2. 프로그램이 컴파일러에 의해 AST구조로 파싱 되고, 바이트 코드로 컴파일 됨. 3. 바이트코드가 런타임에 의해 평가(실행 및 결과 도출)됨. 2. ts코드로 작성된 프로그램의 실행 과정 프로그래머가 작성한 타입스크립트 코드가 TSC컴파일러에 의해 AST구조로 파싱됨. 파싱된 AST구조의 코드는 타입체커에 의해 타입이 검사됨. 타입스크립트 AST를 자바스크립트 코드로 변환 자바스크립트 코드를 AST구조로 파싱 AST구조의 코드가 바이트 코드로 컴파일 됨. 컴파일된 바이트 코드가 자바스크립트의 런타임에의해 실..
Define Styled Components outside of the render method It is important to define your styled components outside of the render method, otherwise it will be recreated on every single render pass. Defining a styled component within the render method will thwart caching and drastically slow down rendering speed, and should be avoided. Write your styled components the recommended way: const StyledWrap..
백준에서 stdin의 파일을 읽을 때 윈도우에서는 '/r/n'을 해야하지만 백준에 제출할 떄는 개행 문자를 '/n'로 해야함... import * as fs from 'fs'; const solution = (map: number[][]) => { let houseIdx = 2; const houseCntArr: number[] = []; const dx = [-1, 1, 0, 0]; const dy = [0, 0, -1, 1]; const bfs = (x: number, y: number) => { const queue: { x: number; y: number; }[] = []; queue.push({ x, y, }); let cnt = 0; while (queue.length > 0) { const..
- 20200504
- chapter8
- 20200317
- likelion
- 20200624
- 20200420
- 생활코딩리눅스
- 20200319
- 백준
- 20200330
- 20200622
- 20200427
- 20200503
- 20200417
- 20200429
- 20200424
- 20200415
- 20200406
- 20200421
- 20200428
- chapter7
- 20200502
- 20201204
- 20200510
- 20200425
- 20200804
- 20200413
- 20200423
- 20200403
- 20200512
- Total
- Today
- Yesterday