text.d.ts 893 B

1234567891011121314151617181920212223
  1. import { Range } from '..';
  2. import { ExtendedType } from './custom-types';
  3. /**
  4. * `Text` objects represent the nodes that contain the actual text content of a
  5. * Slate document along with any formatting properties. They are always leaf
  6. * nodes in the document tree as they cannot contain any children.
  7. */
  8. export interface BaseText {
  9. text: string;
  10. }
  11. export declare type Text = ExtendedType<'Text', BaseText>;
  12. export interface TextInterface {
  13. equals: (text: Text, another: Text, options?: {
  14. loose?: boolean;
  15. }) => boolean;
  16. isText: (value: any) => value is Text;
  17. isTextList: (value: any) => value is Text[];
  18. isTextProps: (props: any) => props is Partial<Text>;
  19. matches: (text: Text, props: Partial<Text>) => boolean;
  20. decorations: (node: Text, decorations: Range[]) => Text[];
  21. }
  22. export declare const Text: TextInterface;
  23. //# sourceMappingURL=text.d.ts.map