Skip to content
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

Translate playground example (3.8 breaking changes) into ja #797

Merged
merged 3 commits into from
Jul 25, 2020

Conversation

bobstrange
Copy link
Contributor

@bobstrange bobstrange commented Jul 24, 2020

Part of #220
Checking Unions with Index Signatures.ts

@bobstrange bobstrange requested a review from orta as a code owner July 24, 2020 10:13
@ghost
Copy link

ghost commented Jul 24, 2020

CLA assistant check
All CLA requirements met.

// verify that undeclared fields in a union conform to any indexed
// types in the union.
// 以前のバージョンのTypeScriptでは、
// インデックスシグネチャを含む共用体に宣言されていないフィールドについて
Copy link
Contributor Author

Choose a reason for hiding this comment

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

indexed typeの翻訳で、一般的に使用されていると思われるインデックスシグネチャとしました 🙇

Ref: TypeScript Deep Dive


// For example, the TimingCache below indicates that any
// key on the object will be a number:
// 例えば、以下のIdentifierCacheは、
Copy link
Contributor Author

Choose a reason for hiding this comment

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

原文がTimingCacheとなっているのですが、文脈的にIdentifierCacheだと思われるので、変更しました。
What I'm wondering if I should fix this change on the original one 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

確かにIdentifierCacheっぽいですね
もともとの方にPR送っていただけると 🙏

@orta
Copy link
Contributor

orta commented Jul 24, 2020

Thanks❤️

/cc @DuGlaser @sasurau4 @Quramy

Copy link
Contributor

@sasurau4 sasurau4 left a comment

Choose a reason for hiding this comment

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

ありがとうございます!
いくつか指摘しました!

// types in the union.
// 以前のバージョンのTypeScriptでは、
// インデックスシグネチャを含む共用体に宣言されていないフィールドについて
// 型チェックが行われませんでした
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
// 型チェックが行われませんでした
// 型チェックが行われませんでした

Comment on lines 6 to 7
// インデックスシグネチャについてはこちら: example:indexed-types
// を参照してください。
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
// インデックスシグネチャについてはこちら: example:indexed-types
// を参照してください。
// インデックスシグネチャについてはこちら: example:indexed-types


// For example, the TimingCache below indicates that any
// key on the object will be a number:
// 例えば、以下のIdentifierCacheは、
Copy link
Contributor

Choose a reason for hiding this comment

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

確かにIdentifierCacheっぽいですね
もともとの方にPR送っていただけると 🙏

Comment on lines 25 to 26
// こちらが修正され、型チェックにより、
// 'file_two'のキーについてのエラーが出るようになりました。
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
// こちらが修正され、型チェックにより、
// 'file_two'のキーについてのエラーが出るようになりました。
// こちらが修正され、コンパイラーから
// 'file_two'のキーについてのエラーが出るようになりました。


// This also takes into account when the key is a different
// type, for example: ([key: string] and [key: number])
// この型チェックは、キーの型が異なる場合にも考慮に入れられています。
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

@sasurau4 sasurau4 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@orta
Copy link
Contributor

orta commented Jul 25, 2020

Thanks everyone!

@orta orta merged commit 45b114f into microsoft:v2 Jul 25, 2020
@bobstrange bobstrange deleted the translate/3-8_breaking-changes branch July 25, 2020 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants