@@ -13,23 +13,28 @@ type CSS = CSSProperties
1313
1414type Component = Vue . Component | Vue . DefineComponent
1515
16+ type ThemeObject = { theme : { type : any ; required : true } }
17+
1618type StyledHTMLElement = {
1719 [ K in keyof IntrinsicElementAttributes ] : (
18- str : TemplateStringsArray
20+ str : TemplateStringsArray ,
21+ ...placeholders : ( (
22+ props : Vue . ExtractPropTypes < ThemeObject >
23+ ) => string | { toString : ( ) => string } ) [ ]
1924 ) => Vue . DefineComponent < IntrinsicElementAttributes [ K ] >
2025}
2126
2227type StyledFunctionHTMLElement = {
2328 <
2429 Props = { [ key : string ] : Vue . Prop < unknown > } ,
25- K extends keyof IntrinsicElementAttributes
30+ K extends keyof IntrinsicElementAttributes = any
2631 > (
2732 component : K ,
2833 props ?: Props
2934 ) : (
3035 str : TemplateStringsArray ,
3136 ...placeholders : ( (
32- props : Vue . ExtractPropTypes < Props >
37+ props : Vue . ExtractPropTypes < Props & ThemeObject >
3338 ) => string | { toString : ( ) => string } ) [ ]
3439 ) => Vue . DefineComponent <
3540 Vue . ExtractPropTypes < Props > & IntrinsicElementAttributes [ K ]
@@ -38,7 +43,10 @@ type StyledFunctionHTMLElement = {
3843
3944type StyledVueComponent = {
4045 < Props , T extends Component > ( component : T ) : (
41- str : TemplateStringsArray
46+ str : TemplateStringsArray ,
47+ ...placeholders : ( (
48+ props : Vue . ExtractPropTypes < ThemeObject >
49+ ) => string | { toString : ( ) => string } ) [ ]
4250 ) => Vue . DefineComponent < Props > & T
4351}
4452
@@ -224,7 +232,7 @@ interface IntrinsicElementAttributes {
224232 view : Vue . SVGAttributes
225233}
226234
227- export const ThemeProvider : Vue . DefineComponent < { theme : object } >
235+ export const ThemeProvider : Vue . DefineComponent < ThemeObject >
228236
229237export const css : ( input : TemplateStringsArray ) => string
230238
0 commit comments