import { Optional } from '@ephox/katamari'; export interface Gene { id: string; name: string; children: Gene[]; css: Record; attrs: Record; text?: string; parent: Optional; random?: number; } export const Gene = (id: string, name: string, children: Gene[] = [], css: Record = {}, attrs: Record = {}, text?: string): Gene => { const parent = Optional.none(); return { id, name, children, css, attrs, text, parent }; };