# typed-tuple-type

> a type utility to apply tuple feature to TypedArray such as Float32Array in TypeScript context

Latest version **1.0.2** (published 2019-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install typed-tuple-type
pnpm add typed-tuple-type
yarn add typed-tuple-type
bun add typed-tuple-type
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-11-10 |
| First published | 2019-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | whatasoda |
| Maintainers | whatasoda |
| Keywords | typescript, typedarray, tuple |

## Links

- npm: https://www.npmjs.com/package/typed-tuple-type
- Repository: https://github.com/whatasoda/typed-tuple-type
- Homepage: https://github.com/whatasoda/typed-tuple-type#readme
- Issues: https://github.com/whatasoda/typed-tuple-type/issues
- npm.io page: https://npm.io/package/typed-tuple-type

## 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

- 1.0.2 (latest) — 2019-11-10
- 1.0.1 — 2019-11-10

## README

[![npm version](https://badge.fury.io/js/typed-tuple-type.svg)](https://badge.fury.io/js/typed-tuple-type)
# typed-tuple-type
a type utility to apply tuple feature to TypedArray such as Float32Array in TypeScript context

## What `typed-tuple-type` is
```ts
const vector3 = new Float32Array(3).fill(0);
vector3[0] // 0
vector3[1] // 0
vector3[2] // 0
vector3[3] // undefined

let vector2: Float32Tuple<2>;
vector2 = new Float32Array(1); // Error
vector2 = new Float32Array(2); // OK
vector2 = new Float32Array(3); // OK
```

## Installation

```sh
npm i -D typed-tuple-type
```

### `tsconfig.json`
To load `typed-tuple-type`, add `"node_modules/typed-tuple-type"` to `typeRoots` in your `tsconfig.json`
```js
{
  "compilerOptions": {
    "typeRoots": [
      "node_modules/@types",
      "node_modules/typed-tuple-type"
    ]
  },
}
```

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