Skip to content

Intellisense should show internals of an interface declaration on hover #38040

Closed
@mjsarfatti

Description

@mjsarfatti

Search Terms

  • intellisense interface
  • intellisense interface expand

Suggestion

I'm trying to re-open and start a discussion around #32616 and #12920, which were closed as "working as intended". It may well be the case, but it would be useful if Interfaces were expanded by default just as Type Aliases are.

Is there a hard reason impeding this I'm not seeing?

What are the metrics saying that "in general interfaces are longer"? Today Interfaces and Type Aliases offer almost the same features and they are for the most part interchangeable (especially for typing objects, see: https://stackoverflow.com/a/52682220/416714)

I understand there is a discussion around expandable hints (#25784). Would that be the occasion to bring expanded-by-default Interfaces?

Examples

When hovering over a Type:

Screenshot 2020-04-18 at 15 44 41

When hovering over an Interface:

Screenshot 2020-04-18 at 15 45 01

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Metadata

Metadata

Assignees

Labels

Domain: Quick Infoe.g. hover text, tool-tips, and tooltips.Experimentation NeededSomeone needs to try this out to see what happensIn DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions