Skip to content

fix: Cannot find name 'useNuxtDevTools' #855

Open
@martinszeltins

Description

@martinszeltins

🐛 The bug

I opened an issue previously but it did not contain all the information how to reproduce this issue. The issue can be reproduced in Stackblitz too.

The issue appears when you have typescript and vue-tsc installed. The type error appears both in IDE and when running typecheck.

Image

Cannot find name 'useNuxtDevTools'.ts-plugin (2304)

This seems to be only a type bug because in runtime it works.

<script setup lang="ts">
    const devtoolsClient = useNuxtDevTools() // Cannot find name 'useNuxtDevTools'.ts-plugin(2304)

    const openDevtools = () => {
        devtoolsClient.value.devtools.toggle() // This works!
    }
</script>

🛠️ To reproduce

https://stackblitz.com/~/github.com/martinszeltins/devtools-types-test

🌈 Expected behavior

Missing Types

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions