Microsoft/TypeScript
GitHub ã§èŠãIncorrect completions in object literal expression for overloads
Open
#52,692 opened on 2023幎2æ9æ¥
Domain: LS: Completion ListsExperience EnhancementHelp WantedSuggestion
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
Bug Report
ð Search Terms
ð Version & Regression Information
⯠Playground Link
Code to test
Simplified from got typings.
interface T {
<T>(input: { type: 'text' })
<T>(input: { type: 'json' })
<T>(input: { type: 'buffer' })
}
declare const func: T
func({ type: /**/ })
No all literal or in-string completions, but okay if remove <T> from each overload.
ð Actual behavior
Completions in func({ type: '|' }) (text) missing completions from func2('|') (text, json, buffer)
ð Expected behavior
Completions for func({ type: '|' }) are the same as for func2('|')
I'm not sure probably its related to https://github.com/microsoft/TypeScript/issues/51047 (or duplicate)