Skip to content

Commit 393ecd5

Browse files
authoredOct 7, 2024··
Replace JSX with React.JSX (#595)
1 parent 7f199d3 commit 393ecd5

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed
 

Diff for: ‎goober.d.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ declare namespace goober {
1111

1212
interface StyledFunction {
1313
// used when creating a styled component from a native HTML element
14-
<T extends keyof JSX.IntrinsicElements, P extends Object = {}>(
14+
<T extends keyof React.JSX.IntrinsicElements, P extends Object = {}>(
1515
tag: T,
1616
forwardRef?: ForwardRefFunction
1717
): Tagged<
18-
JSX.LibraryManagedAttributes<T, JSX.IntrinsicElements[T]> & P & Theme<DefaultTheme>
18+
React.JSX.LibraryManagedAttributes<T, React.JSX.IntrinsicElements[T]> &
19+
P &
20+
Theme<DefaultTheme>
1921
>;
2022

2123
// used to extend other styled components. Inherits props from the extended component
@@ -26,19 +28,22 @@ declare namespace goober {
2628

2729
// used when creating a component from a string (html native) but using a non HTML standard
2830
// component, such as when you want to style web components
29-
<P extends Object = {}>(tag: string): Tagged<P & Partial<JSX.ElementChildrenAttribute>>;
31+
<P extends Object = {}>(tag: string): Tagged<
32+
P & Partial<React.JSX.ElementChildrenAttribute>
33+
>;
3034

3135
// used to create a styled component from a JSX element (both functional and class-based)
32-
<T extends JSX.Element | JSX.ElementClass, P extends Object = {}>(
36+
<T extends React.JSX.Element | React.JSX.ElementClass, P extends Object = {}>(
3337
tag: T,
3438
forwardRef?: ForwardRefFunction
3539
): Tagged<P>;
3640
}
3741

3842
// used when creating a styled component from a native HTML element with the babel-plugin-transform-goober parser
3943
type BabelPluginTransformGooberStyledFunction = {
40-
[T in keyof JSX.IntrinsicElements]: Tagged<
41-
JSX.LibraryManagedAttributes<T, JSX.IntrinsicElements[T]> & Theme<DefaultTheme>
44+
[T in keyof React.JSX.IntrinsicElements]: Tagged<
45+
React.JSX.LibraryManagedAttributes<T, React.JSX.IntrinsicElements[T]> &
46+
Theme<DefaultTheme>
4247
>;
4348
};
4449

0 commit comments

Comments
 (0)
Please sign in to comment.