Skip to content

Commit

Permalink
Improved TypeScript types to avoid potential :any types in children f…
Browse files Browse the repository at this point in the history
…unction params
  • Loading branch information
bvaughn committed May 29, 2023
1 parent 126a988 commit 63c6c8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type BaseProps = {
export type HeightOnlyProps = BaseProps & {
children: (size: VerticalSize) => ReactNode;
defaultHeight?: number;
disableHeight?: false;
disableWidth: true;
onResize?: (size: VerticalSize) => void;
};
Expand All @@ -26,6 +27,7 @@ export type WidthOnlyProps = BaseProps & {
children: (size: HorizontalSize) => ReactNode;
defaultWidth?: number;
disableHeight: true;
disableWidth?: false;
onResize?: (size: HorizontalSize) => void;
};

Expand Down

0 comments on commit 63c6c8e

Please sign in to comment.