wormhole/explorer/src/utils/types/index.tsx

10 lines
200 B
TypeScript

import { Link } from 'gatsby';
export type GetRenderComponentProps<T> = T extends
| React.ComponentType
| typeof Link
? React.ComponentProps<T>
: T extends 'a'
? React.HTMLProps<T>
: {};