refactor: use spread args

This commit is contained in:
Evan You 2018-10-09 18:30:21 -04:00
parent 4974a47111
commit c206531330

View File

@ -80,7 +80,10 @@ type DirectiveArguments = [
DirectiveModifiers | undefined DirectiveModifiers | undefined
][] ][]
export function applyDirectives(vnode: VNode, directives: DirectiveArguments) { export function applyDirectives(
vnode: VNode,
...directives: DirectiveArguments
) {
for (let i = 0; i < directives.length; i++) { for (let i = 0; i < directives.length; i++) {
applyDirective(vnode, ...directives[i]) applyDirective(vnode, ...directives[i])
} }