Skip to content
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

With vue-i18n it gives types error of $t and $i18n usage #13

Open
dhavalt091 opened this issue Nov 27, 2023 · 1 comment
Open

With vue-i18n it gives types error of $t and $i18n usage #13

dhavalt091 opened this issue Nov 27, 2023 · 1 comment

Comments

@dhavalt091
Copy link

As soon as i enable/install Vue Language Features (Volar) in VS code, i get type errors in html wherever $t and $i18n is used.

<template> <h1>{{ $t('views.home.title') }}</h1> <h1>{{ $i18n.locale }}</h1> </template>
Above is my html.

And below is how i get errors/warnings by volar.

volar-html

What am i missing here?

@DemocracyAndScience
Copy link

yes , I have same error,
类型“CreateComponentPublicInstance<Readonly<ExtractPropTypes<{}>>, { isClient: typeof isClient; SocialMediaEnum: typeof SocialMediaEnum; ruleFormRef: typeof ruleFormRef; formData: typeof formData; rules: typeof rules; resetForm: typeof resetForm; submitForm: typeof submitForm; }, ... 17 more ..., {}>”上不存在属性“$t”。ts-plugin(2339)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants