Commit 926adfeb authored by Robert Knight's avatar Robert Knight

Fix a couple of misc typechecking errors in src/annotator

parent 201a2eb2
...@@ -152,7 +152,7 @@ AnnotationSync.prototype._tag = function (ann, tag) { ...@@ -152,7 +152,7 @@ AnnotationSync.prototype._tag = function (ann, tag) {
if (ann.$tag) { if (ann.$tag) {
return ann; return ann;
} }
tag = tag || window.btoa(Math.random()); tag = tag || window.btoa(Math.random().toString());
Object.defineProperty(ann, '$tag', { Object.defineProperty(ann, '$tag', {
value: tag, value: tag,
}); });
......
...@@ -6,7 +6,7 @@ import SvgIcon from '../../shared/components/svg-icon'; ...@@ -6,7 +6,7 @@ import SvgIcon from '../../shared/components/svg-icon';
/** /**
* @param {Object} props * @param {Object} props
* @param {import("preact/hooks").Ref<HTMLButtonElement>} [props.buttonRef] * @param {import("preact").Ref<HTMLButtonElement>} [props.buttonRef]
* @param {boolean} [props.expanded] * @param {boolean} [props.expanded]
* @param {string} [props.extraClasses] * @param {string} [props.extraClasses]
* @param {string} props.label * @param {string} props.label
...@@ -74,7 +74,7 @@ ToolbarButton.propTypes = { ...@@ -74,7 +74,7 @@ ToolbarButton.propTypes = {
* Callback to toggle visibility of highlights in the document. * Callback to toggle visibility of highlights in the document.
* @prop {() => any} toggleSidebar - * @prop {() => any} toggleSidebar -
* Callback to toggle the visibility of the sidebar. * Callback to toggle the visibility of the sidebar.
* @prop {import("preact/hooks").Ref<HTMLButtonElement>} [toggleSidebarRef] - * @prop {import("preact").Ref<HTMLButtonElement>} [toggleSidebarRef] -
* Ref that gets set to the toolbar button for toggling the sidebar. * Ref that gets set to the toolbar button for toggling the sidebar.
* This is exposed to enable the drag-to-resize functionality of this * This is exposed to enable the drag-to-resize functionality of this
* button. * button.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment