You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/jsdoc-reference.md
+35-35
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ var win;
43
43
/**@type{PromiseLike<string>}*/
44
44
var promisedString;
45
45
46
-
//You can specify an HTML Element with DOM properties
46
+
//DOM 프로퍼티를 사용하여 HTML 요소를 지정할 수 있습니다
47
47
/**@type{HTMLElement}*/
48
48
var myElement =document.querySelector(selector);
49
49
element.dataset.myData="";
@@ -439,27 +439,27 @@ var result = C(1);
439
439
440
440
> Note: 오류 메시지는 [a JSConfig](/docs/handbook/tsconfig-json.html) 및 [`checkJs`](/tsconfig#checkJs)가 활성화된 상태에서만 JS 코드 베이스에 나타납니다.
441
441
442
-
With `@constructor`, `this` is checked inside the constructor function `C`, so you will get suggestions for the `initialize`method and an error if you pass it a number. Your editor may also show warnings if you call `C` instead of constructing it.
442
+
`@constructor`를 사용하면 생성자 함수 `C`안에 `this`가 있는지 검사하므로, `initialize`메서드에 대한 제안사항을 받으며 만약 인자로 숫자를 넘긴다면 오류가 발생합니다. 또한 `C`를 생성하지 않고 호출만 한다면 에디터에서 경고를 표시할 수 있습니다.
443
443
444
-
Unfortunately, this means that constructor functions that are also callable cannot use `@constructor`.
444
+
유감스럽게도, 이는 호출가능한 생성자 함수는 `@constructor`를 사용하지 못함을 의미합니다.
445
445
446
446
## `@this`
447
447
448
-
The compiler can usually figure out the type of `this` when it has some context to work with. When it doesn't, you can explicitly specify the type of `this` with `@this`:
448
+
컴파일러는 코드가 동작할 컨텍스트가 있다면 보통 `this`의 타입을 파악할 수 있습니다. 그렇지 않은 경우, `@this`를 사용하여 명확하게 `this`의 타입을 지정할 수 있습니다:
449
449
450
450
```js
451
451
/**
452
452
* @this{HTMLElement}
453
453
* @param{*}e
454
454
*/
455
455
functioncallbackForLater(e) {
456
-
this.clientHeight=parseInt(e); //should be fine!
456
+
this.clientHeight=parseInt(e); //잘 작동해야 합니다!
457
457
}
458
458
```
459
459
460
460
## `@extends`
461
461
462
-
When Javascript classes extend a generic base class, there is nowhere to specify what the type parameter should be. The `@extends`tag provides a place for that type parameter:
462
+
Javascript 클래스를 제네릭 기반 클래스로부터 상속(extend)하면, 매개변수가 어떤 타입이 되어야 하는지 지정할 곳이 없습니다. `@extends`태그는 이러한 타입 매개변수를 위한 위치를 제공합니다:
463
463
464
464
```js
465
465
/**
@@ -471,11 +471,11 @@ class SortableSet extends Set {
471
471
}
472
472
```
473
473
474
-
Note that `@extends` only works with classes. Currently, there is no way for a constructor function extend a class.
474
+
`@extends`는 클래스에서만 작동합니다. 현재까지, 생성자 함수가 클래스를 상속할 수 있는 방법은 없습니다.
475
475
476
476
## `@enum`
477
477
478
-
The `@enum`tag allows you to create an object literal whose members are all of a specified type. Unlike most object literals in Javascript, it does not allow other members.
478
+
`@enum`태그는 멤버가 모두 지정된 객체 리터럴을 만들 수 있게 도와줍니다. Javascript 대부분의 객체 리터럴과 달리, 이 태그는 다른 멤버를 허용하지 않습니다.
479
479
480
480
```js
481
481
/**@enum{number}*/
@@ -488,7 +488,7 @@ const JSDocState = {
488
488
JSDocState.SawAsterisk;
489
489
```
490
490
491
-
Note that `@enum` is quite different from, and much simpler than, TypeScript's `enum`. However, unlike TypeScript's enums, `@enum` can have any type:
491
+
`@enum`은 TypeScript의 `enum`과 상당히 다르고, 더 간단합니다. 하지만 TypeScript의 열거형(enum)과 달리, `@enum`은 어떠한 타입도 가질 수 있습니다:
492
492
493
493
```js
494
494
/**@enum{function(number): number}*/
@@ -501,65 +501,65 @@ const MathFuncs = {
501
501
MathFuncs.add1;
502
502
```
503
503
504
-
## More examples
504
+
## 추가 예제 (More examples)
505
505
506
506
```js
507
507
classFoo {}
508
508
// ---cut---
509
509
var someObj = {
510
510
/**
511
-
* @param{string}param1 - Docs on property assignments work
0 commit comments