Skip to content

Commit

Permalink
Context: Omit as prop in types (WordPress#38844)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka authored Feb 16, 2022
1 parent 805cc5a commit e7c8f34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/ui/context/wordpress-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type WordPressComponentProps<
? {
as?: T | keyof JSX.IntrinsicElements;
}
: { as?: never } );
: {} );

export type WordPressComponent<
T extends React.ElementType,
Expand All @@ -29,7 +29,7 @@ export type WordPressComponent<
> = {
< TT extends React.ElementType >(
props: WordPressComponentProps< O, TT, IsPolymorphic > &
( IsPolymorphic extends true ? { as: TT } : { as: never } )
( IsPolymorphic extends true ? { as: TT } : {} )
): JSX.Element | null;
(
props: WordPressComponentProps< O, T, IsPolymorphic >
Expand Down

0 comments on commit e7c8f34

Please sign in to comment.