How to write types for better usability

This page summarizes the projects mentioned and recommended in the original post on dev.to

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.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • dom-eater

  • To use type guards, Animal must be made a union type. Real example: dom-eater

  • lube-series

  • In fact, setTimeout can execute eval by passing a string as a callback, but we will not consider this part. Real example: async-lube

  • 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
  • TypeScript

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

  • As mentioned earlier, TypeScript has a lot of bugs. One of the critical bugs I encountered is that when using the typeof keyword in a generic function when generating d.ts files using tsc and JSDoc, the compiler does not reflect it properly and converts it to any type. However, there are many bugs in TypeScript, and contributing to the project is quite cumbersome. Even to report a bug, you need to search the issue list of thousands to see if it is already a known bug. If you encounter a bug, the best way is to create a PR to fix it, but also consider clunky solutions. I solved the above bug by writing a script to convert the returns type of any type JSDoc. autogenerated d.ts I will attach a playground for some of TypeScript's bugs. TypeScript Bugs JSDoc d.ts Bugs

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

  • JSR Is Not Another Package Manager

    2 projects | news.ycombinator.com | 25 Apr 2024
  • Understanding the Difference Between Type and Interface in TypeScript

    1 project | dev.to | 2 Apr 2024
  • Proposal: Types as Configuration

    1 project | news.ycombinator.com | 1 Apr 2024
  • A Deep Dive into the satisfies operator in Typescript

    1 project | dev.to | 12 Mar 2024
  • Building a full stack app with Remix, Prisma, and Neon

    2 projects | dev.to | 12 Mar 2024