infinitelytyped

Types that act like the standard library.

Usage no npm install needed!

<script type="module">
  import infinitelytyped from 'https://cdn.skypack.dev/infinitelytyped';
</script>

README

Banner



Types that act like the standard library.


Infinitely Typed strives to provide useful utility types to enhance your own, for better type checking and intellisense. It uses a handful of base utility types to construct more meaningful types that mimic the behaviour of the standard library.


Usage

Stick this triple-slash directive at the top of your file to use the namespace InfinitelyTyped.

/// <reference types="infinitelytyped" />

Alternatively, you can place this in a global.d.ts file and have the namespace available globally.

Or you can put it in another type declaration file and include it in your tsconfig.json's include property.


Getting started

All the types are stored in a single global namespace, which is InfinitelyTyped.

This namespace exposes more namespaces that have the actual utility types.

The most important namespace is InfinitelyTyped.Utils which contains most of the types.

Next is InfinitelyTyped.Shared which holds types that could be shared by many types.

Then you have the following namespaces:

  • InfinitelyTyped.Strings
  • InfinitelyTyped.Arrays

If anything gets confusing, please read the documentation or join the Discord server.


Documentation

The documentation can be found here and covers all the utility types.

If anything is outdated or outright incorrect please either open an issue or submit a pull request to get it fixed!



Provided by the ŤŷpęȘčrīpț Čūļt, licensed under MIT.