Skip to content

Typing error with app.use() #807

Closed
@hongquan

Description

@hongquan

Describe the bug

Since Vue v3.2.47, this line of code:

app.use(fluent)

raises typing error:

yarn build
yarn run v1.22.19
$ vue-tsc && vite build
src/main.ts:22:5 - error TS2554: Expected 2 arguments, but got 1.

22 app.use(fluent)
       ~~~~~~~~~~~

  node_modules/@vue/runtime-core/dist/runtime-core.d.ts:78:63
    78     use<Options extends unknown[]>(plugin: Plugin_2<Options>, ...options: Options): this;
                                                                     ~~~~~~~~~~~~~~~~~~~
    Arguments for the rest parameter 'options' were not provided.


Found 1 error in src/main.ts:22

I reported the issue to Vue project, but Vue core developer identified that it is fluent-vue's bug.

Reproduction

https://bitbucket.org/hongquan/vue-wrong-argument-for-use

System Info

System:
    OS: Linux 5.19 Ubuntu 22.10 22.10 (Kinetic Kudu)
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    Memory: 6.45 GB / 11.59 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 18.14.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 9.3.1 - /usr/bin/npm
  Browsers:
    Chrome: 110.0.5481.100
    Firefox: 110.0
  npmPackages:
    vue: ^3.2.47 => 3.2.47

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct.
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions