import { Descendant , Text } from 'slate' ; import { omit } from './object' ; export function getProperties < TNode extends Descendant > ( node ) { return omit ( node , ( Text . isText ( node ) ? 'text' : 'children' ) as keyof TNode ) as unknown as Omit < TNode , TNode extends Text ? 'text' : 'children' > ; }