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

0.4.0 • Public • Published

Installation

npm install --save @types/levn

Summary

This package contains type definitions for levn (https://github.com/gkz/levn).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/levn.

import { CustomType, ParsedType, ParsedTypeData } from "type-check";

export interface CastableCustomType extends CustomType {
    cast: (input: unknown) => ParsedTypeData;
}

export interface ParseOptions {
    customTypes?: Record<string, CastableCustomType> | undefined;
    explicit?: boolean | undefined;
}

export function parse(
    type: string,
    string: string,
    options?: ParseOptions,
): unknown;

export function parsedTypeParse(
    parsedType: ParsedType,
    input: string,
    options?: ParseOptions,
): unknown;

export const VERSION: string;

Additional Details

Credits

These definitions were written by Josh Goldberg.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/levn

Weekly Downloads

17,163

Version

0.4.0

License

MIT

Unpacked Size

3.74 kB

Total Files

5

Last publish

Collaborators

  • types