@mocanvas/editor · constant
declare const T: {
readonly any: Validator<any>;
readonly unknown: Validator<unknown>;
readonly string: Validator<string>;
readonly number: Validator<number>;
readonly boolean: Validator<boolean>;
readonly bigint: Validator<bigint>;
readonly integer: Validator<number>;
readonly positiveNumber: Validator<number>;
readonly nonZeroNumber: Validator<number>;
readonly positiveInteger: Validator<number>;
readonly nonZeroInteger: Validator<number>;
readonly literal: typeof literal;
readonly literalEnum: typeof literalEnum;
readonly object: typeof object;
readonly arrayOf: typeof arrayOf;
readonly setOf: typeof setOf;
readonly dict: typeof dict;
readonly union: typeof union;
readonly or: typeof or;
readonly optional: typeof optional;
readonly nullable: typeof nullable;
readonly model: typeof model;
readonly jsonValue: Validator<unknown>;
readonly jsonObject: Validator<Record<string, unknown>>;
readonly idOfType: typeof idOfType;
readonly indexKey: Validator<IndexKey>;
readonly vecModel: ObjectValidator<ObjectValidatorType<{
readonly x: Validator<number>;
readonly y: Validator<number>;
readonly z: Validator<number | undefined>;
}>>;
readonly boxModel: ObjectValidator<ObjectValidatorType<{
readonly x: Validator<number>;
readonly y: Validator<number>;
readonly w: Validator<number>;
readonly h: Validator<number>;
}>>;
readonly srcUrl: Validator<string>;
readonly linkUrl: Validator<string>;
}The validation library, as one namespace object.
It is a plain object rather than a TS namespace so that it can be
re-exported, spread and stubbed like any other value.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.