diff --git a/goober.d.ts b/goober.d.ts index e3bb5da2..fa342df2 100644 --- a/goober.d.ts +++ b/goober.d.ts @@ -11,11 +11,13 @@ declare namespace goober { interface StyledFunction { // used when creating a styled component from a native HTML element - ( + ( tag: T, forwardRef?: ForwardRefFunction ): Tagged< - JSX.LibraryManagedAttributes & P & Theme + React.JSX.LibraryManagedAttributes & + P & + Theme >; // used to extend other styled components. Inherits props from the extended component @@ -26,10 +28,12 @@ declare namespace goober { // used when creating a component from a string (html native) but using a non HTML standard // component, such as when you want to style web components -

(tag: string): Tagged

>; +

(tag: string): Tagged< + P & Partial + >; // used to create a styled component from a JSX element (both functional and class-based) - ( + ( tag: T, forwardRef?: ForwardRefFunction ): Tagged

; @@ -37,8 +41,9 @@ declare namespace goober { // used when creating a styled component from a native HTML element with the babel-plugin-transform-goober parser type BabelPluginTransformGooberStyledFunction = { - [T in keyof JSX.IntrinsicElements]: Tagged< - JSX.LibraryManagedAttributes & Theme + [T in keyof React.JSX.IntrinsicElements]: Tagged< + React.JSX.LibraryManagedAttributes & + Theme >; };