ts-book icon indicating copy to clipboard operation
ts-book copied to clipboard

타입스크립트 교과서 소스 코드

Results 52 ts-book issues
Sort by recently updated
recently updated
newest added

1. 오류메시지 음영이 마지막 줄이 아닌 str = 'template 123'; 을 잘못 가리키고 있습니다. 2. 변수 음영 처리도 마지막 코드의 str에서 해야 합니다.

1쇄

따라서 Key extends string ~~| boolean~~ ? Key[] : never를 거치면

1쇄

Partial ~~함수~~타입입니다.

1쇄

색인을 자주 사용하는 편인데 키워드 목록만 있고 쪽수가 모두 누락되어있습니다.

1쇄

any 외에도 unknown, void **(쉼표없음)** {}, never 등이 있습니다.

1쇄

- myMap 타이핑은 바로 다음 절에서 나옵니다. - myMap이라는 -> myForEach라는 배열에 ~~myMap이라는~~ **_myForEach라는_** 메서드가 존재하지 않기 때문입니다,. 타이핑만 했을 뿐 ~~myMap이라는~~ **_myForEach라는_** 메서드를 구현한 적이 없습니다.

1쇄

``` bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; ``` https://www.typescriptlang.org/play/?ts=5.5.4#code/GYVwdgxgLglg9mABAQwCaoBTIFxhAWwCMBTAJwBpFDtE8izKIa6SLFVmDXLjP63gfVgEpEAbwBQiRKWJQQpJMkQBqKqsQQNqDcQ3AA3BIC+EiRAQBnKCnQBGRAF5bqAHSEYYTHgA2P4UZoqHYYduQATOQAzOQALOQArOQAbAGIZhZg1i7hTi7unt4gfpR2ARJB4RiRMfFJqUbmVjZBUXlBBV4Yvj6llOHlrRi1iSnCGc0use3onUUliGE1g+ixGHVjjZnZQQkzbh5dPX01cSuoCRj15U1ZLejJ+3Pdxb2LEdFxiefJGA1AA 5.5와 4.9 비교

개정판

``` class ColorThief { constructor(); getColors(image: HTMLImageElement): [number, number, number][]; getColor(image: HTMLImageElement): [number, number, number]; } interface Window { ColorThief: typeof ColorThief; } ``` 모듈X 스크립트O Window 인터페이스와 declaration merging

개정판

3.9 flat 분석하기 파트에서 만약 Depth가 22라서 인덱스 접근 타입이 undefined가 되면 어떻게 될까요? 이때는 최대한 flat한 타입이 나오게 됩니다. // type R2 = 1 | 2 | 3type R...

https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties

개정판