Skip to content

Directive's Arg type is incorrect #13757

@czhlin

Description

@czhlin

Vue version

3.5.18

Link to minimal reproduction

test

Steps to reproduce

element-plusvClickOutside指令的Arg可以为HTMLElement
但是DirectiveArg默认为string
Directive Type

What is expected?

export type Directive<
  HostElement = any,
  Value = any,
  Modifiers extends string = string,
  Arg = any,
> =
  | ObjectDirective<HostElement, Value, Modifiers, Arg>
  | FunctionDirective<HostElement, Value, Modifiers, Arg>

What is actually happening?

export type Directive<
  HostElement = any,
  Value = any,
  Modifiers extends string = string,
  Arg extends string = string,
> =
  | ObjectDirective<HostElement, Value, Modifiers, Arg>
  | FunctionDirective<HostElement, Value, Modifiers, Arg>

System Info

Any additional comments?

element-plus/element-plus/#21729
element-plus使用的vue版本3.2.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions