import type { PropertyPath } from 'lodash'; import type { Node } from 'ricos-schema'; import { Node_Type } from 'ricos-schema'; import type { RICOS_NODE_TYPE_TO_DATA_FIELD } from '../consts'; interface TranslatableCommons { id: Node['id']; text: string; } export type Translatable = TextualTranslatable | NonTextualTranslatable; /** Node of type `PARAGRAPH` or `HEADING` */ export interface TextualNode extends Node { type: TextualNodeType; } export declare const isTextualNode: (node: Node) => node is TextualNode; /** Any node that is not of type `PARAGRAPH` or `HEADING` */ export interface NonTextualNode extends Node { type: NonTextualNodeType; } export declare const isNonTextualNode: (node: Node) => node is NonTextualNode; /** Translatable object for `PARAGRAPH` or `HEADING` node */ export interface TextualTranslatable extends TranslatableCommons { type: TextualNodeType; } export interface NonTextualTranslatable extends TranslatableCommons { type: NonTextualNodeType; path: PropertyPath; } export type TextualNodeType = Node_Type.PARAGRAPH | Node_Type.HEADING; export type NonTextualNodeType = Exclude; type NodeToDataField = typeof RICOS_NODE_TYPE_TO_DATA_FIELD; export type DataFieldsNames = NodeToDataField[keyof NodeToDataField] & keyof Node; export type DataFieldNamesWithContainerData = DataFieldsNames & NodeToDataField[keyof Pick]; export type DataFieldsWithContainerData = NonNullable; export {}; //# sourceMappingURL=types.d.ts.map