Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,13 @@ export interface WatchOptionsWithHandler<T> extends WatchOptions {
handler: WatchHandler<T>;
}

export interface DirectiveBinding extends Readonly<VNodeDirective> {
readonly modifiers: { [key: string]: boolean };
}

export type DirectiveFunction = (
el: HTMLElement,
binding: VNodeDirective,
binding: DirectiveBinding,
vnode: VNode,
oldVnode: VNode
) => void;
Expand Down
4 changes: 4 additions & 0 deletions types/test/options-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ Vue.component('component', {
props: {
myProp: "bar"
},
directives: [{
name: 'a',
value: 'foo'
}],
domProps: {
innerHTML: "baz"
},
Expand Down
12 changes: 6 additions & 6 deletions types/vnode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export interface VNodeData {
}

export interface VNodeDirective {
readonly name: string;
readonly value: any;
readonly oldValue: any;
readonly expression: any;
readonly arg: string;
readonly modifiers: { [key: string]: boolean };
name: string;
value?: any;
oldValue?: any;
expression?: any;
arg?: string;
modifiers?: { [key: string]: boolean };
}