Confusion in building a react library with typescript

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.

  • *.d.ts files are never included in the output. You can read this GitHub issue debate for reasons why. You probably want to just type it as a normal .ts file and import it where needed.

  • rollup-plugin-dts

    A rollup plugin to generate .d.ts rollup files for your typescript project

  • TypeScript doesn't have an option to bundle output definition files and it should be fine to have one index.d.ts that then imports other definition files, but if you want to fix that for encapsulation reasons or to better control the API surface, I believe there is a rollup plugin for that (rollup-plugin-dts).

  • 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