Skip to content

Commit e0dcd75

Browse files
authored
Add extra type information to help closure with type of static property. (#923)
* Add extra type information to help closure with type of static property. * Add tslint:disable for "unnecessary" type assertion necessary for closure.
1 parent 8055b93 commit e0dcd75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/updating-element.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,10 @@ export abstract class UpdatingElement extends HTMLElement {
627627
return;
628628
}
629629
const ctor = (this.constructor as typeof UpdatingElement);
630-
const propName = ctor._attributeToPropertyMap.get(name);
630+
// Note, hint this as an `AttributeMap` so closure clearly understands
631+
// the type; it has issues with tracking types through statics
632+
// tslint:disable-next-line:no-unnecessary-type-assertion
633+
const propName = (ctor._attributeToPropertyMap as AttributeMap).get(name);
631634
if (propName !== undefined) {
632635
const options = ctor.getPropertyOptions(propName);
633636
// mark state reflecting

0 commit comments

Comments
 (0)