Fix adding unnecessary colons on Mapped Types#7221
Conversation
|
@cola119 can you add test case? type Anys = { [K in Keys]+? }; |
| type Keys = 'option1' | 'option2'; | ||
| type Flags = { [K in Keys]: boolean }; | ||
|
|
||
| type Anys = { [K in Keys] }; |
There was a problem hiding this comment.
I'm not familiar with the background, but I think it is better to create new directory named /tests/typescript_mapped_type than adding tests to /tests/typescripts/conformance.
(I was previously pointed on a similar thing from @thorn0 . See #6604 (comment))
There was a problem hiding this comment.
It makes sense. I'll try it.
There was a problem hiding this comment.
wait, should I create new tests at /tests/typescript_mapped_type while leaving /tests/typescripts/conformance/mappedType.ts? Or move /tests/typescripts/conformance/mappedType.ts to /tests/typescript_mapped_type?
There was a problem hiding this comment.
I understood the problem by reading the above conversation so I'm going to create new dir while keeping /conformance/mappedType.ts before 🙇
| @@ -0,0 +1,3 @@ | |||
| type Keys = 'option1' | 'option2'; | |||
| type A = { [K in Keys] }; | |||
| type B = { [K in Keys]+? }; | |||
Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>
fixes #7174
This is my first time submitting PR. 🙇
docs/directory)changelog_unreleased/*/pr-XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨