Skip to content

Commit

Permalink
feat: add typing to pathcStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Aug 16, 2018
1 parent 1c6cd3c commit 41e3618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nerv/src/vdom/patch.ts
Expand Up @@ -512,7 +512,7 @@ function patchEvent (
}
}

function patchStyle (lastAttrValue, nextAttrValue, dom) {
function patchStyle (lastAttrValue: CSSStyleSheet, nextAttrValue: CSSStyleSheet, dom: HTMLElement) {
const domStyle = dom.style
let style
let value
Expand Down Expand Up @@ -577,7 +577,7 @@ export function patchProp (
} else if (isAttrAnEvent(prop)) {
patchEvent(prop, lastValue, nextValue, domNode)
} else if (prop === 'style') {
patchStyle(lastValue, nextValue, domNode)
patchStyle(lastValue, nextValue, domNode as HTMLElement)
} else if (
prop !== 'list' &&
prop !== 'type' &&
Expand Down

0 comments on commit 41e3618

Please sign in to comment.