Skip to content

Commit

Permalink
Improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed May 8, 2023
1 parent 0f9c19b commit 7ac47ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Outline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type PDFOutline = Awaited<ReturnType<PDFDocumentProxy['getOutline']>>;

type OutlineProps = {
className?: string;
inputRef?: React.RefObject<HTMLDivElement>;
inputRef?: React.Ref<HTMLDivElement>;
onItemClick?: (props: OnItemClickArgs) => void;
onLoadError?: (error: Error) => void;
onLoadSuccess?: (outline: PDFOutline | null) => void;
Expand Down
5 changes: 2 additions & 3 deletions src/shared/propTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ export const isPdf = PropTypes.oneOfType([

export const isRef = PropTypes.oneOfType([
PropTypes.func,
PropTypes.shape({
current: PropTypes.oneOfType([PropTypes.instanceOf(HTMLDivElement), PropTypes.oneOf([null])])
.isRequired,
PropTypes.exact({
current: PropTypes.any,
}),
]);

Expand Down

0 comments on commit 7ac47ed

Please sign in to comment.