npm.io
0.4.0 • Published 2 years ago

@types/levn

Licence
MIT
Version
0.4.0
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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.

index.d.ts

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.