$mark-schema.d.ts 747 B

12345678910111213141516171819
  1. import type { Ctx, MilkdownPlugin } from '@milkdown/ctx';
  2. import type { MarkSchema } from '@milkdown/transformer';
  3. import type { $Ctx } from '../$ctx';
  4. import type { $Mark } from '../$mark';
  5. export type GetMarkSchema = (ctx: Ctx) => MarkSchema;
  6. export type $MarkSchema<T extends string> = [
  7. schemaCtx: $Ctx<GetMarkSchema, T>,
  8. schema: $Mark
  9. ] & {
  10. id: $Mark['id'];
  11. type: $Mark['type'];
  12. mark: $Mark;
  13. ctx: $Ctx<GetMarkSchema, T>;
  14. schema: MarkSchema;
  15. key: $Ctx<GetMarkSchema, T>['key'];
  16. extendSchema: (handler: (prev: GetMarkSchema) => GetMarkSchema) => MilkdownPlugin;
  17. };
  18. export declare function $markSchema<T extends string>(id: T, schema: GetMarkSchema): $MarkSchema<T>;
  19. //# sourceMappingURL=$mark-schema.d.ts.map