22export type CustomElementGetter = ( ) => any
33export type CustomElementMethod = ( ...args : any [ ] ) => void
44
5- export interface CustomElementProperty {
6- type : String | Number | Boolean | Object
5+ export interface CustomElementProperty < AT > {
6+ type : String | Number | Boolean | Object | Array < AT >
77 required ?: boolean
88 observed ?: boolean
9- default ?: string | number | boolean | object
9+ default ?: string | number | boolean | object | Array < AT >
1010}
1111
1212export interface CustomElementComputedTree {
1313 [ key : string ] : CustomElementGetter
1414}
1515
16- export interface CustomElementPropertyTree {
17- [ key : string ] : CustomElementProperty
16+ export interface CustomElementPropertyTree < AT > {
17+ [ key : string ] : CustomElementProperty < AT >
1818}
1919
20- export type CustomElementOptions < T > = {
21- renderer ?: ( what : T , where : Element ) => void
20+ export type CustomElementOptions < WT , AT > = {
21+ renderer ?: ( what : WT , where : Element ) => void
2222 root ?: "standard" | "shadow" | "shadow:closed"
23- render : ( ) => T
23+ render : ( ) => WT
2424 computed ?: CustomElementComputedTree
25- props ?: CustomElementPropertyTree
25+ props ?: CustomElementPropertyTree < AT >
2626 created ?: ( ) => void
2727 mounted ?: ( ) => void
2828 updated ?: ( ) => void
@@ -32,7 +32,7 @@ export type CustomElementOptions<T> = {
3232 [ key : string ] : CustomElementMethod
3333}
3434
35- export declare function createCustomElement < I , T > ( tagName : string , options : CustomElementOptions < T > ) : void
35+ export declare function createCustomElement < WT , AT > ( tagName : string , options : CustomElementOptions < WT , AT > ) : void
3636
3737// Modules
3838type UseFn = typeof use
0 commit comments