Files
NapCatQQ/.pnpm-store/v3/files/62/b9598c687cc70d7f21df81610e0af73668084496e9848bb6a27941d868159506d50aff468fb7da2f4cec07efc2ec57e10c80e94b8eae2af9de37bd4509fc90
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

15 lines
684 B
Plaintext

import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import { type TLiteral } from '../literal/index.mjs';
import { Kind, Hint } from '../symbols/index.mjs';
export type TEnumRecord = Record<TEnumKey, TEnumValue>;
export type TEnumValue = string | number;
export type TEnumKey = string;
export interface TEnum<T extends Record<string, string | number> = Record<string, string | number>> extends TSchema {
[Kind]: 'Union';
[Hint]: 'Enum';
static: T[keyof T];
anyOf: TLiteral<T[keyof T]>[];
}
/** `[Json]` Creates a Enum type */
export declare function Enum<V extends TEnumValue, T extends Record<TEnumKey, V>>(item: T, options?: SchemaOptions): TEnum<T>;