UNPKG

@jsonjoy.com/json-type

Version:

High-performance JSON Pointer implementation

20 lines (19 loc) 872 B
import type { AbsType, AnyType, ArrType, BinType, BoolType, ConType, FnRxType, FnType, MapType, NumType, OrType, RefType, StrType, Type, t } from '../type'; import { type ObjType } from '../type/classes/ObjType'; export declare class Random { static readonly gen: <T extends Type>(type: T) => t.infer<T>; gen(type: AbsType<any>): unknown; any(type: AnyType): unknown; arr(type: ArrType<any, any, any>): unknown[]; bin(type: BinType<any>): Uint8Array; bool(type: BoolType): boolean; con(type: ConType): unknown; fn(type: FnType<any, any>): unknown; fn$(type: FnRxType<any, any>): unknown; map(type: MapType<any>): Record<string, unknown>; num(type: NumType): number; obj(type: ObjType<any>): Record<string, unknown>; or(type: OrType<any>): unknown; ref(type: RefType<any>): unknown; str(type: StrType): string; }