import * as React from 'react'; import AnnotatorContext from './AnnotatorContext'; import { AnnotatorState, GetMatchPath } from './types'; export interface WithAnnotatorContextProps { annotatorState?: AnnotatorState; emitAnnotatorActiveChangeEvent?: (id: string) => void; emitRemoveEvent?: (id: string) => void; getAnnotationsMatchPath?: GetMatchPath; getAnnotationsPath?: (fileVersionId?: string, annotationId?: string) => string; } export default function withAnnotatorContext

(WrappedComponent: React.ComponentType

) { return React.forwardRef>, P>((props, ref) => ( {({ emitActiveChangeEvent, emitRemoveEvent, getAnnotationsMatchPath, getAnnotationsPath, state }) => ( )} )); }