# @types/type-check

> TypeScript definitions for type-check

Latest version **0.3.31** (published 2024-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/type-check
pnpm add @types/type-check
yarn add @types/type-check
bun add @types/type-check
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.31 |
| Published | 2024-09-06 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/type-check
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/type-check
- npm.io page: https://npm.io/package/@types/type-check

## Recent versions

- 0.3.31 (latest) — 2024-09-06
- 0.3.30 (ts4.7) — 2023-11-07
- 0.3.28 (ts4.3) — 2023-09-12
- 0.3.27 (ts3.6) — 2016-09-19
- 0.3.29 — 2023-10-18
- 0.3.26 — 2016-07-14
- 0.3.25-alpha — 2016-07-08
- 0.3.24-alpha — 2016-07-04
- 0.3.23-alpha — 2016-07-02
- 0.3.22-alpha — 2016-07-02
- 0.3.21-alpha — 2016-07-01
- 0.3.20-alpha — 2016-05-25
- 0.3.19-alpha — 2016-05-20
- 0.3.14-alpha — 2016-05-19
- 0.3.13-alpha — 2016-05-17

## README

# Installation
> `npm install --save @types/type-check`

# Summary
This package contains type definitions for type-check (https://github.com/gkz/type-check).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/type-check.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/type-check/index.d.ts)
````ts
export const VERSION: string;

export interface CustomType {
    typeOf: string;
    validate: (input: unknown) => boolean;
}

export interface CustomTypes {
    [typeName: string]: CustomType;
}

export interface Options {
    customTypes?: CustomTypes;
}

export function typeCheck(type: string, input: unknown, options?: Options): boolean;

// This is, in fact, a single element tuple.
// eslint-disable-next-line @definitelytyped/no-single-element-tuple-type
export type ParsedType = [ParsedTypeData];

export interface ParsedTypeData {
    type: string;
}

export function parseType(type: string): ParsedType;

export function parsedTypeCheck(parsedType: ParsedType, input: string, options?: Options): boolean;

````

### Additional Details
 * Last updated: Fri, 06 Sep 2024 21:07:35 GMT
 * Dependencies: none

# Credits
These definitions were written by [Hans Windhoff](https://github.com/hansrwindhoff).

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