Files
ETB/ETB-FrontEnd/node_modules/@emotion/styled/src/jsx-namespace.ts
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

13 lines
608 B
TypeScript

// this is basically a slimmed down copy of https://github.com/emotion-js/emotion/blob/main/packages/react/types/jsx-namespace.d.ts
// it helps to avoid issues when combining newer `@emotion/styled` and older `@emotion/react` versions
// in such setup, ReactJSX namespace won't exist in `@emotion/react` and that would lead to errors
import 'react'
type IsPreReact19 = 2 extends Parameters<React.FunctionComponent<any>>['length']
? true
: false
// prettier-ignore
/** @ts-ignore */
export type ReactJSXIntrinsicElements = true extends IsPreReact19 ? JSX.IntrinsicElements : React.JSX.IntrinsicElements