bookish-potato-dto
Version:
A TypeScript DTO (Data Transfer Object) parsing and validation library. Define a schema once — get runtime validation and a fully inferred TypeScript type for free.
8 lines (7 loc) • 313 B
TypeScript
import { EnumType } from '../_types';
import { PropertyParserAbstract } from './property-parser.abstract';
export declare class PropertyParserEnum<T extends string | number> extends PropertyParserAbstract<T> {
private readonly enumType;
constructor(enumType: EnumType<T>);
parse(value: unknown): T;
}