@@ -8,38 +8,28 @@ type WithConditionalCSSProp<P> = 'className' extends keyof P
8
8
: { }
9
9
: { }
10
10
11
- // unpack all here to avoid infinite self-referencing when defining our own JSX namespace
12
- type ReactJSXElement = React . JSX . Element
13
- type ReactJSXElementClass = React . JSX . ElementClass
14
- type ReactJSXElementAttributesProperty = React . JSX . ElementAttributesProperty
15
- type ReactJSXElementChildrenAttribute = React . JSX . ElementChildrenAttribute
16
- type ReactJSXLibraryManagedAttributes < C , P > =
17
- React . JSX . LibraryManagedAttributes < C , P >
18
- type ReactJSXIntrinsicAttributes = React . JSX . IntrinsicAttributes
19
- type ReactJSXIntrinsicClassAttributes < T > = React . JSX . IntrinsicClassAttributes < T >
20
- type ReactJSXIntrinsicElements = React . JSX . IntrinsicElements
21
-
22
11
// based on the code from @types /[email protected]
23
12
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/3197efc097d522c4bf02b94e1a0766d007d6cdeb/types/react/index.d.ts#LL3204C13-L3204C13
24
13
type ReactJSXElementType = string | React . JSXElementConstructor < any >
25
14
26
15
export namespace EmotionJSX {
27
16
type ElementType = ReactJSXElementType
28
- interface Element extends ReactJSXElement { }
29
- interface ElementClass extends ReactJSXElementClass { }
17
+ interface Element extends React . JSX . Element { }
18
+ interface ElementClass extends React . JSX . ElementClass { }
30
19
interface ElementAttributesProperty
31
- extends ReactJSXElementAttributesProperty { }
32
- interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { }
20
+ extends React . JSX . ElementAttributesProperty { }
21
+ interface ElementChildrenAttribute
22
+ extends React . JSX . ElementChildrenAttribute { }
33
23
34
24
type LibraryManagedAttributes < C , P > = WithConditionalCSSProp < P > &
35
- ReactJSXLibraryManagedAttributes < C , P >
25
+ React . JSX . LibraryManagedAttributes < C , P >
36
26
37
- interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { }
27
+ interface IntrinsicAttributes extends React . JSX . IntrinsicAttributes { }
38
28
interface IntrinsicClassAttributes < T >
39
- extends ReactJSXIntrinsicClassAttributes < T > { }
29
+ extends React . JSX . IntrinsicClassAttributes < T > { }
40
30
41
31
type IntrinsicElements = {
42
- [ K in keyof ReactJSXIntrinsicElements ] : ReactJSXIntrinsicElements [ K ] & {
32
+ [ K in keyof React . JSX . IntrinsicElements ] : React . JSX . IntrinsicElements [ K ] & {
43
33
css ?: Interpolation < Theme >
44
34
}
45
35
}
0 commit comments