Feature request - inline type aliases

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

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • 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

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
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