1
0
mirror of https://github.com/vector-im/hydrogen-web.git synced 2025-01-14 05:57:26 +01:00

template view: remove type duplication

This commit is contained in:
Bruno Windels 2022-04-25 14:05:31 +02:00
parent 22df062bbb
commit a52423856d

@ -181,7 +181,7 @@ export class TemplateBuilder<T extends IObservableValue> {
this._templateView._addEventListener(node, name, fn, useCapture);
}
_addAttributeBinding(node: Element, name: string, fn: (value: T) => boolean | string): void {
_addAttributeBinding(node: Element, name: string, fn: AttributeBinding<T>): void {
let prevValue: string | boolean | undefined = undefined;
const binding = () => {
const newValue = fn(this._value);