mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
13 lines
533 B
TypeScript
13 lines
533 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const baseTextAttributes = z.object({
|
|
bold: z.literal(true).optional().nullable().catch(undefined),
|
|
italic: z.literal(true).optional().nullable().catch(undefined),
|
|
underline: z.literal(true).optional().nullable().catch(undefined),
|
|
strike: z.literal(true).optional().nullable().catch(undefined),
|
|
code: z.literal(true).optional().nullable().catch(undefined),
|
|
link: z.string().optional().nullable().catch(undefined),
|
|
});
|
|
|
|
export type BaseTextAttributes = z.infer<typeof baseTextAttributes>;
|