Skip to content

Incorrect completions in object literal expression for overloadsΒ #52692

Open
@zardoy

Description

@zardoy

Bug Report

πŸ”Ž Search Terms

πŸ•— Version & Regression Information

⏯ Playground Link

ts play code

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 #51047 (or duplicate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions