@@ -65,7 +65,7 @@ export interface WebCellClass<P extends WebCellProps = WebCellProps, S = {}>
6565
6666export function mixin < P = WebCellProps , S = { } > (
6767 superClass = HTMLElement
68- ) : WebCellClass {
68+ ) : WebCellClass < P , S > {
6969 class WebCell extends superClass implements WebCellComponent < P , S > {
7070 static tagName : string ;
7171 static extends ?: string ;
@@ -92,7 +92,7 @@ export function mixin<P = WebCellProps, S = {}>(
9292 super ( ) ;
9393
9494 const { renderTarget, eventDelegaters, style } = this
95- . constructor as WebCellClass ;
95+ . constructor as WebCellClass < P , S > ;
9696
9797 const renderChildren = renderTarget === 'children' ;
9898
@@ -125,7 +125,7 @@ export function mixin<P = WebCellProps, S = {}>(
125125 }
126126
127127 render ( props : P , state : S ) {
128- return ( this . constructor as WebCellClass ) . renderTarget !==
128+ return ( this . constructor as WebCellClass < P , S > ) . renderTarget !==
129129 'children' ? (
130130 < slot />
131131 ) : (
@@ -186,7 +186,7 @@ export function mixin<P = WebCellProps, S = {}>(
186186 setProps ( data : Partial < P > ) {
187187 Object . assign ( this . props , data ) ;
188188
189- const { attributes } = this . constructor as WebCellClass ;
189+ const { attributes } = this . constructor as WebCellClass < P , S > ;
190190
191191 if ( attributes )
192192 var attributesChanged = new Promise < void > ( resolve =>
@@ -204,10 +204,10 @@ export function mixin<P = WebCellProps, S = {}>(
204204 return this . updateAsync ( ) ;
205205 }
206206
207- setAttribute ( name : string , value : string | number | boolean ) {
207+ setAttribute ( name : string , value : string ) {
208208 super . setAttribute ( name , value ) ;
209209
210- const { attributes } = this . constructor as WebCellClass ;
210+ const { attributes } = this . constructor as WebCellClass < P , S > ;
211211
212212 if ( ! attributes . includes ( name ) ) return ;
213213
0 commit comments