Skip to content

Language Service not providing autocomplete on object literal in union type #3303

@nycdotnet

Description

@nycdotnet

Hi,

I'm not sure if this is possible or not, but neither VS 2015 RC with the TypeScript 1.5 beta plugin nor atom-typescript offer autocompletion in this example:

https://github.com/TypeStrong/typestrong-compiler/blob/35d8eb8662d9ad882ff29642fcb74191421d362c/typestrong-compiler.ts#L18-L19

If I remove either consoleOutput or actualVersion from the object literal passed to resolve, TypeScript will correctly complain. However, if I begin to type con or act to put those properties back, I don't get help. I'm assuming that this is because resolve() accepts ether T or Thenable<T> and perhaps the language service just gives up when it sees a union?

//cc: @basarat @mhegazy

If this is not fixable without going crazy, no big deal. The compiler is working correctly - it's just that the autocomplete experience could be better.

Thanks!

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions