일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
- 해커톤
- 와글와글
- npm
- 타입 챌린지 IndexOf
- 타입스크립트
- Type Challenge
- 코딩테스트
- 맵필로그
- TypeScript
- typeorm
- 와글와글 해커톤
- 노드 교과서 개정2판
- 타입챌린지 Readonly2
- HTTP
- Access Token과 Refresh Token
- node.js
- 해커톤 준비사항
- nestjs
- 타입 챌린지
- apple login
- TypeScript 타입챌린지
- 타입 챌린지 Deep Readonly
- 백엔드
- Conditional Types
- 타입챌린지
- type challenge omit
- Mappilogue
- Array.prototype.push
- network
- 189-Awaited
- Today
- Total
목록전체 글 (49)
iamkanguk.dev
1장에서는 타입스크립트라는 언어에 대해서 설명을 하는 파트이다.자바스크립트와 타입스크립트의 관계에 대해서 중요하게 다루는 것 같다.아이템1: 타입스크립트와 자바스크립트의 관계 이해하기타입스크립트는 인터프리터로 실행되는 것도 아니고 C와 Java 같은 저수준 언어로 컴파일 되는 것이 아니다.또 다른 고수준 언어인 JavaScript로 컴파일 되고 실행 역시 TypeScript가 아닌 JavaScript로 이루어진다.타입스크립트는 자바스크립트의 상위집합(Superset)이다.타입스크립트의 타입 시스템은 자바스크립트 런타임 동작을 모델링한다.타입 체크를 통과해도 런타임에 오류가 발생하는 경우const names = ['Alice', 'Bob'];console.log(names[2].toUpperCase());..
1. 개요 발견은 엊그제 한 것 같은데 오늘 쓰는 이유는... 곧 다가올 면접이 있어서 늦어졌다. 사실 대단한 내용은 아니어서 쓸까 말까 고민했는데,, 그래도 책 제작자와 실제로 얘기를 나눠보면서 문제를 해결한게 처음이어서 신기하기도 하고 면접때문에 마음이 싱숭생숭 해서 잠깐 쉴겸 적어보려고 한다. 제로초님의 Node.js 교과서 개정2판을 평소에 시간날 때 읽으면서 좀 깊게 공부를 해보고 있다. 공부를 하는 와중에 오류가 발생한 부분을 찾아내서 GitHub Issue를 통해 연락을 드려 수정 요청을 보냈다. 특별하게 내용이 관심이 없으신 분들을 위해 GitHub Issue 링크를 드리도록 하겠다. https://github.com/ZeroCho/nodejs-book/issues/801 [개정2판 P.1..
문제 https://github.com/iamkanguk97/type-challenges/blob/main/questions/05153-medium-indexof/README.md type-challenges/questions/05153-medium-indexof/README.md at main · iamkanguk97/type-challenges Collection of TypeScript type challenges with online judge - iamkanguk97/type-challenges github.com 풀이 /* _____________ Your Code Here _____________ */ /* _____________ Test Cases _____________ */ impor..
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00009-medium-deep-readonly/README.md type-challenges/questions/00009-medium-deep-readonly/README.md at main · type-challenges/type-challenges Collection of TypeScript type challenges with online judge - type-challenges/type-challenges github.com 풀이 /* _____________ 여기에 코드 입력 _____________ */ type DeepReadonly = { readonly ..
유튜브 코딩문TV님이 JavaScript 배열 메서드를 직접 구현해보라는 영상을 올려주셨다. 흥미가 생겨서 하나씩 직접 구현을 해보고 영상이랑 비교해보고 싶었다. 그러는 도중 Push 메서드에서 살짝 막혀서 그 과정과 내가 배운 내용에 대해서 한번 정리해보려고 한다. Push 메서드? JavaScript에서 Push 메서드는 배열의 끝에 하나 이상의 요소를 추가하고, 배열의 새로운 길이를 반환한다. 그리고 하나의 요소가 아닌 여러개의 요소를 Push 할 수 있다. (ex. .push(1,2,3,4)) 참고로 필자는 Push 메서드가 새로운 배열의 길이를 반환하는지 몰랐다....! MDN에서는 예제와 함께 설명하니 참고하면 좋을 것 같다! 필자가 구현한 Push 메서드 (형편없음) function push..
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00008-medium-readonly-2/README.md type-challenges/questions/00008-medium-readonly-2/README.md at main · type-challenges/type-challenges Collection of TypeScript type challenges with online judge - type-challenges/type-challenges github.com 정답 // 1번째 방법과 2번째 방법의 차이는 내장 메서드인 Omit을 사용했냐 안했냐의 차이! // 다양하게 구현할 수 있었던 문제였던 것 같음. 하..
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00003-medium-omit/README.md type-challenges/questions/00003-medium-omit/README.md at main · type-challenges/type-challenges Collection of TypeScript type challenges with online judge - type-challenges/type-challenges github.com 풀이 type MyOmit = { [U in keyof T as U extends K ? never : U]: T[U] } /* _____________ 테스트 케이스 __..
문제 https://github.com/iamkanguk97/type-challenges/blob/main/questions/00189-easy-awaited/README.md 풀이 type MyAwaited = T extends PromiseLike ? R extends PromiseLike ? MyAwaited : R : never; /* _____________ 테스트 케이스 _____________ */ import type { Equal, Expect } from '@type-challenges/utils' type X = Promise type Y = Promise type Z = Promise type Z1 = Promise type T = { then: (onfulfilled: (arg: ..
최근에 타입 챌린지를 풀면서 T extends A ? B : C와 같은 코드를 많이 작성했던 것 같다. 그런데 막상 개념은 모르고 그냥 이런 느낌이구나~ 라고만 알면서 문제를 풀었던 것 같아서 찝찝했는데 공부를 하던 중 좋은 글을 확인해서 공부한 내용을 블로그에 적어보려고 한다. 참고한 블로그 링크는 아래 참고자료에 첨부 할 예정이니 참고하시면 좋을 것 같다! 1. 타입은 가능한 값의 집합이다? 타입은 가능한 값의 집합이다라는 말이 있다. 이 포스팅을 쓰기 전에는 이해가 아예 안됐다. 느낌조차도 오지 않았다 ㅠ 예를 들어 never 타입은 어떤 값도 할당할 수 없는 타입이다. 그래서 공집합({})이라고 말할 수 있다. 그런데 number 타입은 정수, 소수를 할당할 수 있는 타입이다. 이 예시를 보면 충..
문제 https://github.com/type-challenges/type-challenges/blob/main/questions/00014-easy-first/README.md type arr1 = ['a', 'b', 'c'] type arr2 = [3, 2, 1] type head1 = First // expected to be 'a' type head2 = First // expected to be 3 Expect, Expect 123>>, Expect, Expect, 풀이 // S1 type First = T extends [] ? never : T[0]; // S2 type First = T["length"] extends 0 ? never : T[0]; // S3 type First = T ..