UNPKG

915 BTypeScriptView Raw
1import { Range } from '..';
2import { 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 */
8export interface BaseText {
9 text: string;
10}
11export declare type Text = ExtendedType<'Text', BaseText>;
12export 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}
22export declare const Text: TextInterface;
23//# sourceMappingURL=text.d.ts.map
\No newline at end of file