[๋ฆฌ๋ด์ผ] ํ์ ์คํฌ๋ฆฝํธ ์ฌ์ธ์ : Part1. ๊ธฐ๋ณธ ๋ฌธ๋ฒํธ
ํ์ ์คํฌ๋ฆฝํธ ๊ธฐ๋ณธ ๋ฌธ๋ฒ์ ๋ฐฐ์ฐ๊ณ , ๋ค๋ฅธ ์ฌ๋์ด ์์ฑํ ํ์ ์ ๋ถ์ํ๋ ๋ฐฉ๋ฒ๊ณผ, ๋ด๊ฐ ์ง์ ํ์ ์ ์์ฑํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์์๋ด ๋๋ค.
์๊ฐ์ 1,583๋ช
๋์ด๋ ์ด๊ธ
์๊ฐ๊ธฐํ ๋ฌด์ ํ

๋ค๋ฅธ ์๊ฐ์๋ค์ด ์์ฃผ ๋ฌผ์ด๋ณด๋ ์ง๋ฌธ์ด ๊ถ๊ธํ์ ๊ฐ์?
- ๋ฏธํด๊ฒฐ
๋ฐ์ฝ๋ ์ดํฐ๊ฐ ํ์ฌ๋ ์์ฃผ ์ฐ์ด๋ ๋ฌธ๋ฒ์ธ๊ฐ์?
๋ค์ ์์ํ๊ณ ์ด๋ ต๋ค์ใ ๊ผญ ์์์ผ ํ๋ ๋ฌธ๋ฒ์ผ๊น์??
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
70
2
- ๋ฏธํด๊ฒฐ
์ ํธ๋ฆฌํฐ ํ์ ์ค์ ๋ก ๊ตฌํ์ ๋ชปํด๋ ํ๋์ฉ ์ธ์ฐ๋ฉด ์ค๋ฌดํ ๋ ์ง์ฅ ์๊ฒ ์ฃ ?
ใ ใฑใด์ ๋๋ค.
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
60
1
- ๋ฏธํด๊ฒฐ
๋งคํ ํ์ ์ type์์๋ฐ์ ์๋๋ค๊ณ ํ๋ค์?
์ฒ์์ interface๋ก ๊ตฌํํ ๋ ค๊ณ ํ๋๊น ์๋ฌ๊ฐ ๋๋ค์? ์ด์ ๊ฐ ๋ญ๊น์?
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
56
2
- ๋ฏธํด๊ฒฐ
์๋ฐ์์์ ์ค๋ฒ๋ก๋ฉ๊ณผ ๊ฐ์ ๊ฐ๋ ์ด๋ผ๊ณ ์๊ฐํด๋ ๋๋์?
๊ฐ์ ํด๋์ค ์์์ ๋งค๊ฐ๋ณ์๋ง ๋ค๋ฅด๊ณ ๋ฉ์๋์ ์ด๋ฆ์ด ๊ฐ์๋ ๋ค๋ฅธ ๋ฉ์๋๋ผ๊ณ ์ ์๋๋๊ฒ์ฒ ๋จธ ๊ฐ์
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
61
2
- ๋ฏธํด๊ฒฐ
filter ํจ์ ๋ฐํ ํ์ ๋ค๋ก์ ์ง๋ฌธ
๊ฐ์ : filter ์ ๋ค๋ฆญ ๋ถ์ 14:00์ด์์ผ๋ก filter ํจ์ ์ธ๋ ๋ฐํ type์ ์ ํํ ๋ค๋ก์ ํ๊ณ ์ถ์ ๋์๋ ๊ฐ์์ฒ๋ผ ๋งค๋ฒ predicate ํ์
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
59
2
- ๋ฏธํด๊ฒฐ
map<U>(callbackfn: ....) ํ ๋ U๋ ์ ์ฌ๊ธฐ ์๋๊ฑฐ์์??
๊ฐ์ : forEach, map ์ ๋ค๋ฆญ ๋ถ์ 16:20์ด์ ๋ ์ ๋ค๋ฆญ์ด ์ ๋ฌ๋๋ ์์๊ฐ Array๋ง ๋ณด๋ฉด Array์ ๋จผ์ ๋ค์ด๊ฐ๊ณ ์ด๊ฒ ์ด์ fo
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
41
2
- ๋ฏธํด๊ฒฐ
ts ์ปดํ์ผ์ ์ํ type ๋ผ๋ฒจ๋ง ๋ถ๋ถ
ํ์ ์คํฌ๋ฆฝํธ๋ฅผ ์ํ ๋ผ๋ฒจ๋ก ๊ฐ์ฒด์ type ์์ฑ์ ๋ฃ๊ณ ์ถ์๋ฐ, ์ด๋ฏธ api ๋ช ์ธ์ type ์์ฑ์ด ๋ค๋ฅธ ์๋ฏธ๋ก ์ฐ์ด๊ธฐ ์ํด ์ ์๋์ด ๋ด๋ ค์ค๋ฉด ์ด๋กํ์ฃ ?type์ด ์ด๋ฏธ ์๋ ๊ฐ์ฒด๋ง ๋ค๋ฅธ label์ ๋ฃ์๋
typescript์์คํ ์น์์
ใป
7๋ฌ ์
0
41
1
- ๋ฏธํด๊ฒฐ
concat ํจ์ ํ์ ๊ตฌํ ์ค ์ง๋ฌธ ์์ต๋๋ค!
<img src="https://cdn.inflearn.com/public/files/posts/3d004afd-5b1b-497d-bd22-19467b111600/2dfab49f-1130-409f-b7f7-8efa5f9fdb41.png" media-type="img"
typescript์กฐ์ฑ์ง/์ปดํจํฐ๊ณตํ๋ถ(์ปดํจํฐ๊ณตํ์ ๊ณต
ใป
8๋ฌ ์
0
95
2
- ๋ฏธํด๊ฒฐ
filter ๋ฉ์๋ ์ง๋ฌธ
<img src="https://cdn.inflearn.com/public/files/posts/36b6ea4e-d416-4364-ae61-0c61146bf68f/1f94bf25-57d5-4078-8cf1-5e9f8e21ea84.png" media-type="img"
typescript์กฐ์ฑ์ง/์ปดํจํฐ๊ณตํ๋ถ(์ปดํจํฐ๊ณตํ์ ๊ณต
ใป
8๋ฌ ์
0
50
1
- ๋ฏธํด๊ฒฐ
forEach ์ ๋ค๋ฆญ ๊ด๋ จ ๋ฌธ์
๋ฌธ์1)interface Array {forEach(callbackfn: (value: T, index: number, array: T[]
typescript์ ๋ค๋ฆญ์ต๋ณ๊ตญ
ใป
10๋ฌ ์
0
56
1
- ํด๊ฒฐ
ํ์ ์ถ๋ก ์ ๊ฐ์ฅ ๋์ ๋ฒ์๋ก ์ถ๋ก ์ด ๋๋ ๊ฑด๊ฐ์?
๋จผ์ ํ ์คํธ ํด ๋ณธ ์ฝ๋ ์ฌ๋ฆฝ๋๋ค.const obj = { a: '123', b: 'hello', c: 'world' } as { a: string, b: `hel${string}`, r
typescript๊น์ฑ๋ฏผ
ใป
0
155
1
- ๋ฏธํด๊ฒฐ
enum์ด javascript๋ก ํธ๋์คํ์ผ๋ง๋ ๋ ์ฌ๋ผ์ง๋คํ์ จ๋๋ฐ์
"enum, keyof, typeof" ๊ฐ์ 2๋ถ 20์ด๊ฒฝ enum์ด javascript๋ก transpiling๋ ๋ ์ฌ๋ผ์ง๋คํ์ จ๋๋ฐ์.์ด๋ ๊ฒ ๋๋ค๋ฉด enum ์ฌ์ฉํ
typescriptsungchul09
ใป
0
202
1
- ํด๊ฒฐ
ํจ์ ํ๋ผ๋ฏธํฐ ํ์ ์ ์ ์ ...args: any[]์ ...args: any ์ ์ฐจ์ด
ํจ์ ํ์ ์ ์ ์ ...args ์ any[] ๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๋ฅผ ๋ง์ด ๋ดค์ต๋๋ค. any> // 1 <T e
typescriptwbb
ใป
0
217
1
- ๋ฏธํด๊ฒฐ
Flat type์์ ReadonlyArray ํ์ ์ ์ฌ์ฉํ๋ ์ด์ ?
FlatArray ํ์ ์์ recur ๋ฅผ ํ ๋, Arr extends Array๊ฐ ์๋ Arr extends ReadonlyArray ๋ก ํ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค. ๊ทธ๋ฅ, Readonly array๋ผ๋๊ฒ์ ๋ค๋ฅธ ์ฌ๋์๊ฒ ๋ช ์ํ๋ ์ ๋์ ์ฌ์ฉ์ผ๊น์?<c
typescriptRona
ใป
0
152
1
- ๋ฏธํด๊ฒฐ
bind type ์ง๋ฌธ
์๋ ํ์ธ์ ts version 5.5.4 ์ ๋๋ค.bind ํ์ ์ ์๋ ์๋์ ๊ฐ์ด ๋์ด์์ต๋๋ค.bind(this: Function, thisArg: any, ...argArra
typescriptRona
ใป
1
139
1
- ํด๊ฒฐ
Lowercase type ๊ด๋ จ ์ง๋ฌธ
์๋ ํ์ธ์.[๋ฆฌ๋ด์ผ] ํ์ ์คํฌ๋ฆฝํธ ์ฌ์ธ์ ๊ฐ์๋ฅผ ๋ฃ๊ณ ์๋๋ฐ, "infer ํ์ ๋ถ์" ๊ฐ์ข์์ Lowercase type์ ๋ฐฐ์ ์ต๋๋ค.๊ฐ์์์๋ ์๋์ ๊ฐ์ด ํด์ฃผ๋ฉด ์๋ฌ๊ฐ ์๋๋๋ฐ ์ ๋
typescriptRona
ใป
0
148
1
- ๋ฏธํด๊ฒฐ
key-value ํ์ ์๋์ถ๋ก ์ง๋ฌธ๋๋ฆฝ๋๋ค
const StreamingProtocolList = ['HLS', 'DASH', 'CMAF'] as const export type UnionOfTuple = T[number] export
typescript์งํ
ใป
0
261
1
- ํด๊ฒฐ
ํ์ ์คํฌ๋ฆฝํธ ๊ต๊ณผ์, p131
์ฌ๊ธฐ์ Person3 ๊ฒฐ๊ณผ๋ก Person: {"name: "z
typescript์์ฐ
ใป
0
259
1
- ํด๊ฒฐ
ํ์ ์คํฌ๋ฆฝํธ ๊ต๊ณผ์ p122 forEach ๋ฉ์๋ ์ง๋ฌธ
[1, 2, 3].forEach((item, index, array) => { console.log(item, index, array); }); [1, 2, 3].forEach((item,
typescript์์ฐ
ใป
0
221
1
- ํด๊ฒฐ
ํ์ ์คํฌ๋ฆฝํธ ๊ต๊ณผ์ p116 , ์ฝ๋์๋ฌ๋จ
class Person { name: string; age: number; married: boolean; } constructor(name: string, age:
typescript์์ฐ
ใป
1
257
1






