Feature request - inline type aliases

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/typescript

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    TypeScript has fantastic type inference capabilities, deriving the return types of functions even when quite complex. Additionally, it has the ability to create a type alias from that derived type using `ReturnType` (which just got a LOT more powerful in 4.7 because it added generics support via instantiation expressions). However, one thing that's always bothered me is that, while the type is derived from the return type, you can't then specify that the function returns that alias. I made a small feature request to add a potential solution:

  • Visual Studio Code

    Visual Studio Code

    Expanded types get truncated with `...` in previews. This isn't just a VSCode display bug, but baked into the compiler. You get the same ellipsis when trying to emit the type from the compiler api. See https://github.com/microsoft/vscode/issues/94679 & https://github.com/microsoft/TypeScript/issues/28508

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts