An open API service indexing awesome lists of open source software.

https://github.com/peterboyer/intersect

Intersect union types.
https://github.com/peterboyer/intersect

typescript

Last synced: about 1 year ago
JSON representation

Intersect union types.

Awesome Lists containing this project

README

          

# intersect

## Installation

```shell
npm install pb.intersect
```

## Requirements

- `typescript@>=5.0.0`
- `tsconfig.json > "compilerOptions" > { "strict": true }`

# API

- [`Intersect`](#intersectt)

### `Intersect`

```ts
import type { Intersect } from "pb.intersect";

type Example = { A: true } | { B: true } | { C: true };
type Result = Intersect;
// ^ { A: true } & { B: true } & { C: true }
// ^ { A: true; B: true; C: true }
```