Skip to content

Intellisense for generic parameterized string literal function arguments not working #55530

Closed

Description

@njgraf512
  • VSCode Version: 1.26.0-insider
  • OS Version: MacOS 10.12.6

Steps to Reproduce:

  1. Enter the following into a TS file:
const myObj =  {
  foo: 'Foo',
  bar: 'Bar',
}

function myFunc<T>(obj: T, key: keyof T) {
  return obj[key];
}

myFunc(myObj, 'f')
  1. Observe that once you begin typing the f of string literal foo for the function's second argument, the tooltip switches from suggesting "foo" | "bar" to never:

Good:

screen shot 2018-07-31 at 2 52 01 pm

Bad:

screen shot 2018-07-31 at 2 52 48 pm

  1. Also, triggering intellisense with control+space does not suggest foo or bar:

screen shot 2018-07-31 at 2 52 26 pm

Does this issue occur when all extensions are disabled?: Yes/No
No

Activity

  1. mjbvz commented on Aug 24, 2018

    @mjbvz
    Contributor

    This issue was moved to microsoft/TypeScript#26662

  2. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    typescriptTypescript support issues
    on Aug 24, 2018
  3. locked and limited conversation to collaborators on Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

typescriptTypescript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions