UNPKG

@baqhub/sdk

Version:

The official JavaScript SDK for the BAQ federated app platform.

35 lines (34 loc) 1.24 kB
import * as IO from "./io.js"; export interface SchemaArrayOptions { minItems?: number; maxItems?: number; distinctItems?: boolean; } declare function schemaArray<I extends IO.Mixed>(itemsSchema: I, options?: SchemaArrayOptions): IO.Type<readonly I["_A"][], readonly IO.OutputOf<I>[], unknown>; declare function schemaMap<V extends IO.Mixed>(valuesSchema: V): IO.RecordC<IO.StringC, V>; declare function schemaBoolean(): IO.BooleanC; export interface SchemaStringOptions { minLength?: number; maxLength?: number; } declare function schemaString(options?: SchemaStringOptions): IO.Type<string, string, unknown>; export interface SchemaIntOptions { min?: number; max?: number; } declare function schemaInt(options?: SchemaIntOptions): IO.Type<number, number, unknown>; export interface SchemaNumberOptions { min?: number; max?: number; } declare function schemaNumber(options?: SchemaNumberOptions): IO.Type<number, number, unknown>; export declare const SchemaIO: { object: typeof IO.dualObject; array: typeof schemaArray; map: typeof schemaMap; boolean: typeof schemaBoolean; string: typeof schemaString; int: typeof schemaInt; number: typeof schemaNumber; }; export {};