Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prettify complex type display (for generic-heavy types) #36501

Open
5 tasks done
devdoomari3 opened this issue Jan 29, 2020 · 0 comments
Open
5 tasks done

prettify complex type display (for generic-heavy types) #36501

devdoomari3 opened this issue Jan 29, 2020 · 0 comments
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@devdoomari3
Copy link

devdoomari3 commented Jan 29, 2020

Search Terms

Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info

Suggestion

give indentations + line-changes on type representation. User config for this might be an option.

Examples

suppose I have some generic-heavy function someFunc that returns

const a = someFunc();
// typeof a = RootGeneric<GenericA, GenericB<number, SubGenericB_A<number> ...
//  full type not shown 😭 

A better output can be:

// typeof a = 
RootGeneric<
    GenericA, 
    GenericB<
        number, 
        SubGenericB_A<number> ...

more things:

  • editors can implement "expand(+)" buttons ?
    (collapsed-tree-view)

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.
@devdoomari3 devdoomari3 changed the title prettify complex type display (for generic-heavy uses) prettify complex type display (for generic-heavy types) Jan 29, 2020
@RyanCavanaugh RyanCavanaugh added Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript labels Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants