@@ -272,14 +272,14 @@ function foo(x: [first: string, second: number]) {
272272
273273๋ ์๊ณ ์ถ์ผ์๋ฉด, ๋ผ๋ฒจ๋ง๋ ํํ ์์์ ๋ํ [ ํ ๋ฆฌํ์คํธ] ( https://github.com/microsoft/TypeScript/pull/38234 ) ๋ฅผ ํ์ธํด๋ณด์ธ์
274274
275- ## Class Property Inference from Constructors
275+ ## ์์ฑ์๋ก๋ถํฐ ํด๋์ค ํ๋กํผํฐ ํ์
์ถ๋ก ํ๊ธฐ ( Class Property Inference from Constructors)
276276
277- TypeScript 4.0 can now use control flow analysis to determine the types of properties in classes when ` noImplicitAny ` is enabled.
277+ TypeScript 4.0์์๋ ` noImplicitAny ` ๊ฐ ํ์ฑํ๋์์ ๋ ํด๋์ค ๋ด์ ํ๋กํผํฐ ํ์
์ ๊ฒฐ์ ํ๊ธฐ ์ํด ์ ์ด ํ๋ฆ ๋ถ์์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
278278
279279<!-- prettier-ignore -->
280280``` ts
281281class Square {
282- // Previously both of these were any
282+ // ์ด์ ์ any๋ก ์ถ๋ก ํ์ต๋๋ค.
283283 area;
284284// ^?
285285 sideLength;
@@ -291,7 +291,7 @@ class Square {
291291}
292292```
293293
294- In cases where not all paths of a constructor assign to an instance member, the property is considered to potentially be ` undefined ` .
294+ ์์ฑ์์ ๋ชจ๋ ๊ฒฝ๋ก๊ฐ ์ธ์คํด์ค ๋ฉค๋ฒ์ ํ ๋นํ ๊ฒ์ด ์๋ ๊ฒฝ์ฐ, ํ๋กํผํฐ๋ ์ ์ฌ์ ์ผ๋ก ` undefined ` ๊ฐ ๋ฉ๋๋ค .
295295
296296<!-- prettier-ignore -->
297297``` ts
@@ -312,15 +312,15 @@ class Square {
312312}
313313```
314314
315- In cases where you know better (e.g. you have an ` initialize ` method of some sort ), you'll still need an explicit type annotation along with a definite assignment assertion (` ! ` ) if you're in ` strictPropertyInitialization ` .
315+ ๋ ๋ง์ ๋ด์ฉ์ด ์๋ ๊ฒฝ์ฐ (e.g. ` initialize ` ๋ฉ์๋ ๋ฑ์ด ์๋ ๊ฒฝ์ฐ ), ` strictPropertyInitialization ` ๋ชจ๋์์๋ ํ์ ์ ํ ๋น ๋จ์ธ (` ! ` )์ ๋ฐ๋ผ ๋ช
์์ ์ผ๋ก ํ์
์ ์ ์ธํด์ผ ํฉ๋๋ค .
316316
317317``` ts
318318class Square {
319- // definite assignment assertion
319+ // ํ์ ์ ํ ๋น ๋จ์ธ
320320 // v
321321 sideLength! : number ;
322322 // ^^^^^^^^
323- // type annotation
323+ // ํ์
ํ๊ธฐ
324324
325325 constructor (sideLength : number ) {
326326 this .initialize (sideLength );
@@ -336,7 +336,7 @@ class Square {
336336}
337337```
338338
339- For more details , [ see the implementing pull request ] ( https://github.com/microsoft/TypeScript/pull/379200 ) .
339+ ๋ ์์ธํ ์๊ณ ์ถ๋ค๋ฉด , [ ์ฝ๋๋ฅผ ์คํํ๋ Pull Request๋ฅผ ๋ณด์ธ์ ] ( https://github.com/microsoft/TypeScript/pull/379200 ) .
340340
341341## Short-Circuiting Assignment Operators
342342
0 commit comments