Skip to content

Commit

Permalink
Improve typing of polymorphic refs
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Nov 8, 2024
1 parent 634293a commit e36ba8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/react/src/Breakout/BreakoutCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* @license EUPL-1.2+
* Copyright Gemeente Amsterdam
*/

import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'
import type { BreakoutRowNumber, BreakoutRowNumbers } from './Breakout'
import { breakoutCellClasses } from './breakoutCellClasses'
import type { GridColumnNumber, GridColumnNumbers } from '../Grid/Grid'
Expand Down Expand Up @@ -54,7 +55,7 @@ export const BreakoutCell = forwardRef(
rowStart,
...restProps
}: BreakoutCellProps,
ref: any,
ref: ForwardedRef<any>,
) => (
<Tag
{...restProps}
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'
import { GridCell } from './GridCell'
import { paddingClasses } from './paddingClasses'

Expand Down Expand Up @@ -55,7 +55,7 @@ const GridRoot = forwardRef(
paddingVertical,
...restProps
}: GridProps,
ref: any,
ref: ForwardedRef<any>,
) => (
<Tag
{...restProps}
Expand Down

0 comments on commit e36ba8b

Please sign in to comment.