From c2065313305fbba3bd517010ede0a51459814405 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 9 Oct 2018 18:30:21 -0400 Subject: [PATCH] refactor: use spread args --- packages/core/src/optional/directive.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/optional/directive.ts b/packages/core/src/optional/directive.ts index ba68acb1..7c0df6a8 100644 --- a/packages/core/src/optional/directive.ts +++ b/packages/core/src/optional/directive.ts @@ -80,7 +80,10 @@ type DirectiveArguments = [ DirectiveModifiers | undefined ][] -export function applyDirectives(vnode: VNode, directives: DirectiveArguments) { +export function applyDirectives( + vnode: VNode, + ...directives: DirectiveArguments +) { for (let i = 0; i < directives.length; i++) { applyDirective(vnode, ...directives[i]) }