Skip to content

Typing error with app.use() #807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 tasks done
hongquan opened this issue Feb 16, 2023 · 3 comments · Fixed by #808
Closed
5 tasks done

Typing error with app.use() #807

hongquan opened this issue Feb 16, 2023 · 3 comments · Fixed by #808
Labels
Type: Bug Something isn't working

Comments

@hongquan
Copy link
Contributor

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.
@Demivan
Copy link
Member

Demivan commented Feb 16, 2023

Hi. Thanks for reporting the issue. Do you want to contribute a fix?
If not I will fix it in a few hours.

@hongquan
Copy link
Contributor Author

Thanks, @Demivan
I created a PR for this.

@Demivan Demivan added the Type: Bug Something isn't working label Feb 16, 2023
@Demivan
Copy link
Member

Demivan commented Feb 16, 2023

@hongquan Thanks again for your contribution
Your fix was released as part of v3.2.1 https://github.com/fluent-vue/fluent-vue/releases/tag/v3.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants