Skip to content

Completion does not work for generic type extending tuple or array of all partial type #45617

Description

@ishowta

Bug Report

🔎 Search Terms

auto completion, suggestion, tuple, array, mapped types

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries

⏯ Playground Link

Playground link with relevant code

💻 Code

// It doesn't worktypeBaseTheme={component?: string}declarefunctionextendTheme<Extensionsextends[BaseTheme&Record<string,unknown>]>(extensions: Extensions): voidextendTheme([{/* Can't autocomplete here */}])// list also doesn't worktypeBaseTheme2={component?: string}declarefunctionextendTheme2<Extensionsextends(BaseTheme2&Record<string,unknown>)[]>(extensions: Extensions): voidextendTheme2([{/* Can't autocomplete here */}])// with required field workstypeBaseTheme3={component?: stringrequiredField: string}declarefunctionextendTheme3<Extensionsextends[BaseTheme3&Record<string,unknown>]>(extensions: Extensions): voidextendTheme3([{/* Can autocomplete here */}])// but with required field and complete required field doesn't worktypeBaseTheme4={component?: stringrequiredField: string}declarefunctionextendTheme4<Extensionsextends[BaseTheme4&Record<string,unknown>]>(extensions: Extensions): ExtensionsextendTheme4([{requiredField: 'foo',/* Can't autocomplete here */}])// also BaseTheme with no mapped types doesn't work toodeclarefunctionextendTheme4WithNoMapped<Extensionsextends[BaseTheme4]>(extensions: Extensions): ExtensionsextendTheme4WithNoMapped([{requiredField: 'foo',/* Can't autocomplete here */}])// no extend tuple workstypeBaseTheme5={component?: string}declarefunctionextendTheme5<ExtensionsextendsBaseTheme5>(extensions: [Extensions]): ExtensionsextendTheme5([{/* Can autocomplete here */}])

🙁 Actual behavior

No autocomplete

🙂 Expected behavior

Autocomplete

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions