Files
NapCatQQ/.pnpm-store/v3/files/9b/e7c285d6cb70d0be8f6d2bb54d6b8c119b19eed67c7f40cbbe52931d9ebac1351f467febb9a5ca4c77f9ee52a5620b52dc36659ccef14539530585141f3100
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
913 B
Plaintext

import { type TUnsafe } from '../type/unsafe/index.mjs';
import { TypeBoxError } from '../type/error/index.mjs';
export declare class TypeSystemDuplicateTypeKind extends TypeBoxError {
constructor(kind: string);
}
export declare class TypeSystemDuplicateFormat extends TypeBoxError {
constructor(kind: string);
}
export type TypeFactoryFunction<Type, Options = Record<PropertyKey, unknown>> = (options?: Partial<Options>) => TUnsafe<Type>;
/** Creates user defined types and formats and provides overrides for value checking behaviours */
export declare namespace TypeSystem {
/** Creates a new type */
function Type<Type, Options = Record<PropertyKey, unknown>>(kind: string, check: (options: Options, value: unknown) => boolean): TypeFactoryFunction<Type, Options>;
/** Creates a new string format */
function Format<F extends string>(format: F, check: (value: string) => boolean): F;
}