question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

beta.11 regression: I18N interface no longer has an `install`function

See original GitHub issue

vue & vue-i18n version

ex:

  • vue: 3.0.4
  • vue-i18n: 9.0.0-beta.11

Reproduction Link

https://github.com/cexbrayat/vue-cli-playground/pull/2

Steps to reproduce

yarn and yarn serve throws:

TS2345: Argument of type 'I18n<{ en: { hello: string; }; }, unknown, unknown, true>' is not assignable to parameter of type 'Plugin_2'.
  Property 'install' is missing in type 'I18n<{ en: { hello: string; }; }, unknown, unknown, true>' but required in type '{ install: PluginInstallFunction; }'.
    4 |
    5 | createApp(App)
  > 6 |   .use(i18n)
      |        ^^^^
    7 |   .mount('#app')

Unit tests also fail.

It appears that the I18n interface used to have an install property, but no longer has one in beta.11.

What is Expected?

We should be able to use the i18n plugin with TS

What is actually happening?

We can’t use the plugin as it does not compile with beta.11

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kazuponcommented, Dec 13, 2020

I’ve just released out 9.0.0-beta.12 fixed i18n interface install type missing. please check it!

0reactions
meddariocommented, Dec 25, 2020

Hi, this seems still relevant with version 9.0.0-beta.16:

Argument of type '{ i18n: I18n<{ en: { message: { hello: string; }; }; it: { message: { hello: string; }; }; }, unknown, unknown, true>; }' is not assignable to parameter of type 'Plugin_2'.
  Property 'install' is missing in type '{ i18n: I18n<{ en: { message: { hello: string; }; }; it: { message: { hello: string; }; }; }, unknown, unknown, true>; }' but required in type '{ install: PluginInstallFunction; }'.ts(2345)
runtime-core.d.ts(889, 5): 'install' is declared here.

Is there any workaround?

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue-i18n - npm
vue-i18n. TypeScript icon, indicating that this package has built-in type declarations. 9.2.0-beta.11 • Public • Published a year ago.
Read more >
Chapter 11. Localization - Creating Applications with Mozilla ...
Chapter 11. Localization This chapter describes how to use Mozilla's internationalization (I18N) and localization (L10N) technologies to make applications ...
Read more >
i18n vs l10n — what's the diff? - The Mozilla Blog
Believe it or not, the Mozilla project has a long history of using i18n as the base for the L10n of its products....
Read more >
The vue-i18n-next from intlify - Coder Social Home
vue i18n for vue 3 from coder social. ... beta.11 regression: I18N interface no longer has an `install`function. vue & vue-i18n version.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found