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.