TypeScript:LibraryStructures
lastmod 2022-04-15created 2022-04-151 edits
How to structure libraries.
Overview
Broadly speaking, the way you structure your declaration file depends on how the library is consumed. There are many ways of offering a library for consumption in JavaScript, and you need to write your declaration file to match it. This guide covers how to identify common library patterns, and how to write declaration files which correspond to those patterns.
Each type of major library structuring pattern has a corresponding file in the templates section. You can start with these templates to help you get going faster.