Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

qn: Error using $chakraColorMode method with typescript #469

@lianulloa

Description

@lianulloa

Describe the bug
I have just create a brand new nuxt.js project, with chakra-ui and typescript and if I set script tag's lang attribute to "ts", then it marks me an error over any use of
this.$chakraColorMode(), this.$chakraTheme(), this.$toggleColorMode, this.$toast()

The error: Property '$chakraColorMode' does not exist on type 'CombinedVueInstance<Vue, unknown, unknown, unknown, Readonly<Record<never, any>>>'.Vetur(2339)

Is there any way to work around this??

To Reproduce
Steps to reproduce the behavior:

  1. create a nuxt app with yarn create nuxt-app <project-name>
  2. Select chakra-ui and typescript modules
  3. Activate runtime linting (ignore static/.sw.js)
  4. See error in page index

Expected behavior
Have no errors since this method is injected by chakra-ui

Screenshots
Captura de Pantalla 2021-07-20 a la(s) 1 41 47 a m

Desktop (please complete the following information):

  • OS: [e.g. MacOS Big Sur]

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted 🆘Extra attention is neededtype: contributions welcome 💚Contributions are welcome!type: tooling 🛠Has to do with support modules that enhance the development experience with Chakra UI VuetypescriptTo do with using Typescript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions