Skip to content

Translate 1 file to ko, playground - Recursive Type References #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//// { "compiler": { }, "order": 2 }

// 타입 vs 인터페이스 사용하기 중에 선택하는 것은
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 타입 vs 인터페이스 사용하기 중에 선택하는 것은
// 타입 vs 인터페이스 중 무엇을 사용할 지는

[제안]

// 각 기능의 제약에 관한 것입니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 각 기능의 제약에 관한 것입니다.
// 각 기능의 제약에 대해서 생각해봐야 합니다.

[제안]

// 3.7에서, 인터페이스가 아닌 타입에 있는 제약 중 한 가지를 제거했습니다.

// example:types-vs-interfaces에서 더 많은 내용을 찾아보실 수 있습니다
Copy link
Contributor

@bumkeyy bumkeyy Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// example:types-vs-interfaces에서 더 많은 내용을 찾아보실 수 있습니다
// example:types-vs-interfaces 에서 더 많은 내용을 찾아보실 수 있습니다.


// 타입 자체적으로 내부에서 정의하는
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 타입 자체적으로 내부에서 정의하는
// 타입은 내부에서

// 타입을 참조할 수 없었습니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 타입을 참조할 수 없었습니다.
// 자신의 타입을 참조할 수 없었습니다.

// 인터페이스 내부에 존재하지 않는 한계였었고,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 인터페이스 내부에 존재하지 않는 한계였었고,
// 인터페이스 내에선 존재하지 않는 한계였고,

// 약간의 작업으로 해결할 수 있었습니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 약간의 작업으로 해결할 수 있었습니다.
// 추가적인 작업으로 해결할 수 있었습니다.


// 예를 들어, 3.6에서 이건 가능하지 않습니다:
Copy link
Contributor

@bumkeyy bumkeyy Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 예를 들어, 3.6에서 이건 가능하지 않습니다:
// 예를 들어, 3.6에서 이건 불가능합니다.

type ValueOrArray<T> = T | Array<ValueOrArray<T>>;

// 타입을 인터페이스와 혼합한 구현은
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 타입을 인터페이스와 혼합한 구현은
// 타입을 인터페이스와 같이 사용한 구현은

// 이렇게 보일 것입니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 이렇게 보일 것입니다.
// 아래와 같습니다.

type ValueOrArray2<T> = T | ArrayOfValueOrArray<T>;
interface ArrayOfValueOrArray<T> extends Array<ValueOrArray2<T>> { }

// 자신을 참조하여 동작하는 JSON의
// 종합적인 정의를 허용합니다.

type Json = string | number | boolean | null | Json[] | { [key: string]: Json };

const exampleStatusJSON: Json = {
available: true,
username: "Jean-loup",
room: {
name: "Highcrest",
// 함수를 Json 타입에 추가할 수 없습니다
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 함수를 Json 타입에 추가할 수 없습니다
// Json 타입에 함수를 추가할 수 없습니다

// update: () => {}
},
};

// 3.7 베타 배포 노트와 PR에서 더 많이 배울 수 있습니다:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 3.7 베타 배포 노트와 PR에서 더 많이 배울 수 있습니다:
// 3.7 베타 릴리즈 노트와 PR에서 더 많이 배울 수 있습니다:

//
// https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/
// https://github.com/microsoft/TypeScript/pull/33050