Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 98c4690

Browse files
bumkeyyguyeoldvlprsh
authored
Template 일부 번역(ref #148) (#201)
* Template 일부 번역(ref #148) * Update pages/declaration-files/templates/global-modifying-module.d.ts.md Co-Authored-By: GuyeolJeong <jigu8534@gmail.com> * Update pages/declaration-files/templates/global-modifying-module.d.ts.md Co-Authored-By: GuyeolJeong <jigu8534@gmail.com> * Update pages/declaration-files/templates/global-modifying-module.d.ts.md Co-Authored-By: GuyeolJeong <jigu8534@gmail.com> * Update pages/declaration-files/templates/global.d.ts.md Co-Authored-By: GuyeolJeong <jigu8534@gmail.com> * Update pages/declaration-files/templates/global.d.ts.md Co-Authored-By: GuyeolJeong <jigu8534@gmail.com> * Update pages/declaration-files/templates/global-modifying-module.d.ts.md Co-Authored-By: seoheePark <dvlprsh103@gmail.com> * Update pages/declaration-files/templates/global.d.ts.md Co-Authored-By: seoheePark <dvlprsh103@gmail.com> * 원문 문장 제거 Co-authored-by: GuyeolJeong <jigu8534@gmail.com> Co-authored-by: seoheePark <dvlprsh103@gmail.com>
1 parent 913a20c commit 98c4690

File tree

3 files changed

+50
-50
lines changed

3 files changed

+50
-50
lines changed
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
```ts
2-
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~]
3-
// Project: [~THE PROJECT NAME~]
4-
// Definitions by: [~YOUR NAME~] <[~A URL FOR YOU~]>
2+
// Type definitions for [~라이브러리 이름~] [~선택적 버전 숫자~]
3+
// Project: [~프로젝트 이름~]
4+
// Definitions by: [~내 이름~] <[~ URL~]>
55

6-
/*~ This is the global-modifying module template file. You should rename it to index.d.ts
7-
*~ and place it in a folder with the same name as the module.
8-
*~ For example, if you were writing a file for "super-greeter", this
9-
*~ file should be 'super-greeter/index.d.ts'
6+
/*~ 전역-수정 모듈 템플릿 파일입니다. 사용할 때는 파일 이름을 index.d.ts로 바꿔야 하고,
7+
*~ 모듈과 같은 이름의 폴더 안에 넣으세요.
8+
*~ 예를 들어, "super-greeter"라는 모듈을 만들고 있다면,
9+
*~ 파일의 위치는 'super-greeter/index.d.ts' 이어야 합니다.
1010
*/
1111

12-
/*~ Note: If your global-modifying module is callable or constructable, you'll
13-
*~ need to combine the patterns here with those in the module-class or module-function
14-
*~ template files
12+
/*~ 주의: 전역 수정 모듈이 호출되거나 생성될 수 있다면,
13+
*~ 여기에서 패턴을 모듈-클래스 또는 모듈-함수의 패턴과 결합해야 합니다.
14+
*~ 템플릿 파일
1515
*/
1616
declare global {
17-
/*~ Here, declare things that go in the global namespace, or augment
18-
*~ existing declarations in the global namespace
17+
/*~ 여기에서, 전역 네임스페이스에 포함할 것을 선언하거나,
18+
*~ 전역 네임스페이스에 기존 선언을 보강하세요
1919
*/
2020
interface String {
2121
fancyFormat(opts: StringFormatOptions): string;
2222
}
2323
}
2424

25-
/*~ If your module exports types or values, write them as usual */
25+
/*~ 모듈이 타입이나 값을 export한다면, 평소대로 사용하세요 */
2626
export interface StringFormatOptions {
2727
fancinessLevel: number;
2828
}
2929

30-
/*~ For example, declaring a method on the module (in addition to its global side effects) */
30+
/*~ 예를 들어, 모듈에 메서드를 선언하는 경우 (전역 side effect 이외에) */
3131
export function doSomething(): void;
3232

33-
/*~ If your module exports nothing, you'll need this line. Otherwise, delete it */
33+
/*~ 모듈이 아무것도 export하지 않으면, 이 라인이 필요합니다. 그렇지 않다면 지우세요 */
3434
export { };
35-
```
35+
```

pages/declaration-files/templates/global-plugin.d.ts.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
```ts
2-
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~]
3-
// Project: [~THE PROJECT NAME~]
4-
// Definitions by: [~YOUR NAME~] <[~A URL FOR YOU~]>
2+
// Type definitions for [~라이브러리 이름~] [~선택적 버전 숫자~]
3+
// Project: [~프로젝트 이름~]
4+
// Definitions by: [~내 이름~] <[~ URL~]>
55

6-
/*~ This template shows how to write a global plugin. */
6+
/*~ 전역 플러그인을 작성하는 방법을 보여주는 템플릿입니다. */
77

8-
/*~ Write a declaration for the original type and add new members.
9-
*~ For example, this adds a 'toBinaryString' method with overloads to
10-
*~ the built-in number type.
8+
/*~ 기존의 타입 선언을 작성하고, 새로운 멤버를 추가하세요.
9+
*~ 예를 들어, 아래는 내장 숫자 타입에 'toBinaryString' 메서드를 추가하여
10+
*~ 오버라이드 합니다.
1111
*/
1212
interface Number {
1313
toBinaryString(opts?: MyLibrary.BinaryFormatOptions): string;
1414
toBinaryString(callback: MyLibrary.BinaryFormatCallback, opts?: MyLibrary.BinaryFormatOptions): string;
1515
}
1616

17-
/*~ If you need to declare several types, place them inside a namespace
18-
*~ to avoid adding too many things to the global namespace.
17+
/*~ 여러 타입을 선언해야 한다면, 전역 네임스페이스에 많은 것을 추가하는 상황을 피하기 위해
18+
*~ 네임스페이스 안에 위치시키세요.
1919
*/
2020
declare namespace MyLibrary {
2121
type BinaryFormatCallback = (n: number) => string;
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
```ts
2-
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~]
3-
// Project: [~THE PROJECT NAME~]
4-
// Definitions by: [~YOUR NAME~] <[~A URL FOR YOU~]>
2+
// Type definitions for [~라이브러리 이름~] [~선택적 버전 숫자~]
3+
// Project: [~프로젝트 이름~]
4+
// Definitions by: [~내 이름~] <[~ URL~]>
55

6-
/*~ If this library is callable (e.g. can be invoked as myLib(3)),
7-
*~ include those call signatures here.
8-
*~ Otherwise, delete this section.
6+
/*~ 라이브러리가 호출 가능하다면 (예. myLib(3)처럼 호출 가능하다면)
7+
*~ 여기에 호출 시그니처를 포함하세요.
8+
*~ 그렇지 않으면, 이 섹션은 삭제하세요.
99
*/
1010
declare function myLib(a: string): string;
1111
declare function myLib(a: number): number;
1212

13-
/*~ If you want the name of this library to be a valid type name,
14-
*~ you can do so here.
13+
/*~ 라이브러리의 이름이 유효한 타입 이름으로 사용하고 싶으면,
14+
*~ 여기서 할 수 있습니다.
1515
*~
16-
*~ For example, this allows us to write 'var x: myLib';
17-
*~ Be sure this actually makes sense! If it doesn't, just
18-
*~ delete this declaration and add types inside the namespace below.
16+
*~ 예를 들어, 'var x: myLib'; 처럼 사용할 수 있습니다.
17+
*~ 하지만 이게 실제로 의미 있는지 확인하세요! 그렇지 않다면,
18+
*~ 해당 선언을 삭제하고 아래 네임스페이스 안에 타입을 추가하세요.
1919
*/
2020
interface myLib {
2121
name: string;
2222
length: number;
2323
extras?: string[];
2424
}
2525

26-
/*~ If your library has properties exposed on a global variable,
27-
*~ place them here.
28-
*~ You should also place types (interfaces and type alias) here.
26+
/*~ 전역 변수에 export된 프로퍼티를 라이브러리가 갖고 있다면,
27+
*~ 이곳에 위치시키세요.
28+
*~ 여기에도 타입 (인터페이스와 타입 별칭)을 위치시켜야 합니다.
2929
*/
3030
declare namespace myLib {
31-
//~ We can write 'myLib.timeout = 50;'
31+
//~ 'myLib.timeout = 50;' 라고 사용할 수 있습니다.
3232
let timeout: number;
3333

34-
//~ We can access 'myLib.version', but not change it
34+
//~ 'myLib.version'에 접근할 수 있지만, 수정할 순 없습니다.
3535
const version: string;
3636

37-
//~ There's some class we can create via 'let c = new myLib.Cat(42)'
38-
//~ Or reference e.g. 'function f(c: myLib.Cat) { ... }
37+
//~ 'let c = new myLib.Cat(42)' 또는 참조 (예. 'function f(c: myLib.Cat) { ... }) 를 통해
38+
//~ 클래스를 만들 수 있습니다
3939
class Cat {
4040
constructor(n: number);
4141

42-
//~ We can read 'c.age' from a 'Cat' instance
42+
//~ 'Cat' 인스턴스에서 'c.age'를 읽을 수 있습니다
4343
readonly age: number;
4444

45-
//~ We can invoke 'c.purr()' from a 'Cat' instance
45+
//~ 'Cat' 인스턴스에서 'c.purr()'를 호출할 수 있습니다.
4646
purr(): void;
4747
}
4848

49-
//~ We can declare a variable as
49+
//~ 다음과 같이 변수를 선언할 수 있습니다.
5050
//~ 'var s: myLib.CatSettings = { weight: 5, name: "Maru" };'
5151
interface CatSettings {
5252
weight: number;
5353
name: string;
5454
tailLength?: number;
5555
}
5656

57-
//~ We can write 'const v: myLib.VetID = 42;'
58-
//~ or 'const v: myLib.VetID = "bob";'
57+
//~ 'const v: myLib.VetID = 42;'라고 작성할 수 있습니다.
58+
//~ 또는 'const v: myLib.VetID = "bob";'
5959
type VetID = string | number;
6060

61-
//~ We can invoke 'myLib.checkCat(c)' or 'myLib.checkCat(c, v);'
61+
//~ 'myLib.checkCat(c)' 'myLib.checkCat(c, v);'을 호출할 수 있습니다.
6262
function checkCat(c: Cat, s?: VetID);
6363
}
64-
```
64+
```

0 commit comments

Comments
 (0)