@types/type-check
TypeScript icon, indicating that this package has built-in type declarations

0.3.31 • Public • Published

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.

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/type-check

Weekly Downloads

21,506

Version

0.3.31

License

MIT

Unpacked Size

3.99 kB

Total Files

5

Last publish

Collaborators

  • types