mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] vdom: fix typing issues, small cleanup
This commit is contained in:
+14
-4
@@ -1,3 +1,12 @@
|
||||
|
||||
// because those in TypeScript are too restrictive: https://github.com/Microsoft/TSJS-lib-generator/pull/237
|
||||
declare global {
|
||||
interface Element {
|
||||
setAttribute(name: string, value: string | number | boolean): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | number | boolean): void;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// vnode.ts
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -42,7 +51,6 @@ function vnode(
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// snabbdom.ts
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -721,7 +729,10 @@ function updateProps(oldVnode: VNode, vnode: VNode): void {
|
||||
}
|
||||
}
|
||||
|
||||
export const propsModule = { create: updateProps, update: updateProps } as Module;
|
||||
export const propsModule = {
|
||||
create: updateProps,
|
||||
update: updateProps
|
||||
} as Module;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// module/module.ts
|
||||
@@ -847,7 +858,6 @@ export const eventListenersModule = {
|
||||
destroy: updateEventListeners
|
||||
} as Module;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// attributes.ts
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -908,4 +918,4 @@ export const attrsModule = {
|
||||
update: updateAttrs
|
||||
} as Module;
|
||||
|
||||
|
||||
export const patch = init([eventListenersModule, attrsModule, propsModule]);
|
||||
|
||||
Reference in New Issue
Block a user