Skip to content

Commit b2b03cc

Browse files
committed
fix(types): the directive's modifiers should be optional
1 parent 833f9ea commit b2b03cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/runtime-core/src/directives.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ export type Directive<
111111
| ObjectDirective<HostElement, Value, Modifiers, Arg>
112112
| FunctionDirective<HostElement, Value, Modifiers, Arg>
113113

114-
export type DirectiveModifiers<K extends string = string> = Record<K, boolean>
114+
export type DirectiveModifiers<K extends string = string> = Partial<
115+
Record<K, boolean>
116+
>
115117

116118
export function validateDirectiveName(name: string): void {
117119
if (isBuiltInDirective(name)) {

0 commit comments

Comments
 (0)