import { Editor } from 'slate'; export function getMark(editor: Editor, type: string): T | undefined { const marks = Editor.marks(editor); return marks?.[type]; }