As background for those not familiar with Typescript, types for a dependent package are required for building Typescript projects. If the dependent package does not include types themselves, they can be maintained separately of the repository by the end-user or in another package, usually hosted in the DefinitelyTyped repository. These types often diverge over time from the official packages as changes are made but the external types are not updated.
One major advantage of the Typescript definitions is that, in development environments like VSCode, there is autocomplete as you type. This makes it easier for new developers to get up to speed quickly and able to explore the API as they learn.
For those wondering, type files for non-Typescript projects do not require any additional dependencies. They’re a simply files that get added to the repository and a single
types field is added to the package.json which includes a path to where the main type file is located in the package.