annotorious
annotorious copied to clipboard
@r6o #47 Made `useAnnotator` generic loose w/ default `Annotator<any, unknown>`
Issue
This PR is a follow-up of the #374. I faced the issue with using a TextAnnotator<W3CTextAnnotation> with the useAnnotator:
That's because:
the
TextAnnotationStoredoesn't fully extend theStoretype: https://github.com/recogito/text-annotator-js/blob/bd9e75cd682b809c54c46a3b78bf8bcaeff4a3b2/packages/text-annotator/src/state/TextAnnotationStore.ts#L4-L12 Unfortunately, it blocks users from accessing the Core's store with typing relevant to theTextAnnotation🤷🏻♂️