Skip to content

Prevent Vue.use to be used without options parameter unless it's specified as optional (with ?) #10573

Open
@bitPogo

Description

@bitPogo

What problem does this feature solve?

Reproduction link
Please see: https://tinyurl.com/y5mlgqqh

Steps to reproduce

  1. write a plugin
  2. overload Vue.use ( see the given link above for detail )

What is expected?
During compiling it fails, because the types are not matching.

What is actually happening?
It compiles without errors

What does the proposed API look like?

A possible solution is to change the type in vue/types/vue VueConstructor to:

use(plugin: PluginObject<unknown> | PluginFunction<unknown>, ...options: unknown[]): VueConstructor<V>;

See: https://tinyurl.com/y6anfs8b

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