diff --git a/src/lib/AnnotationControls.ts b/src/lib/AnnotationControls.ts index f97d9fa95..c625dc027 100644 --- a/src/lib/AnnotationControls.ts +++ b/src/lib/AnnotationControls.ts @@ -6,9 +6,9 @@ export const CLASS_ANNOTATIONS_GROUP = 'bp-AnnotationControls-group'; export const CLASS_REGION_BUTTON = 'bp-AnnotationControls-regionBtn'; export const CLASS_BUTTON_ACTIVE = 'is-active'; -export type RegionHandlerType = ({ isRegionActive, event }: { isRegionActive: boolean; event: MouseEvent }) => void; +export type RegionHandler = ({ isRegionActive, event }: { isRegionActive: boolean; event: MouseEvent }) => void; export type Options = { - onRegionClick?: RegionHandlerType; + onRegionClick?: RegionHandler; }; declare const __: (key: string) => string; @@ -37,11 +37,11 @@ export default class AnnotationControls { /** * Region comment button click handler * - * @param {RegionHandlerType} onRegionClick - region click handler in options + * @param {RegionHandler} onRegionClick - region click handler in options * @param {MouseEvent} event - mouse event * @return {void} */ - private handleRegionClick = (onRegionClick: RegionHandlerType) => (event: MouseEvent): void => { + private handleRegionClick = (onRegionClick: RegionHandler) => (event: MouseEvent): void => { const regionButtonElement = event.target as HTMLButtonElement; this.isRegionActive = !this.isRegionActive; @@ -57,7 +57,7 @@ export default class AnnotationControls { /** * Initialize the annotation controls with options. * - * @param {RegionHandlerType} [options.onRegionClick] - Callback when region comment button is clicked + * @param {RegionHandler} [options.onRegionClick] - Callback when region comment button is clicked * @return {void} */ public init({ onRegionClick = noop }: Options = {}): void {