# tset

> A Simple Strongly Typed Set for Typescript

Latest version **0.0.2** (published 2018-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install tset
pnpm add tset
yarn add tset
bun add tset
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-04-10 |
| First published | 2018-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | benjaminjackman |
| Maintainers | benjaminjackman |
| Keywords | typescript |

## Links

- npm: https://www.npmjs.com/package/tset
- npm.io page: https://npm.io/package/tset

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2018-04-10
- 0.0.1 — 2018-03-26

## README

# tset : A simple strongly typed set for typescript

## Example

```
import {TSet} from ".";

//Helper that can be used to help with type inference
function infer<T>(): T {
  return (null as any) as T
}

test('TSet create works', () => {

  const t = TSet(
    //The type of the elements
    // 'null as any as TypeOfElements'
    infer<{
      name: string
    }>(),
    fn => ({
      a: fn({name: "this-is-a"}),
      b: fn({name: "this-is-b"}),
    }))

  expect(t.proto.a.id).toBe("a")
  expect(t.proto.b.id).toBe("b")
  expect(t.proto.a.name).toBe("this-is-a")
  expect(t.proto.b.name).toBe("this-is-b")

});

```

---
_Source: https://npm.io/package/tset · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
