devtools icon indicating copy to clipboard operation
devtools copied to clipboard

fix: Cannot find name 'useNuxtDevTools'

Open martinszeltins opened this issue 10 months ago â€ĸ 0 comments

🐛 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

martinszeltins avatar Apr 18 '25 10:04 martinszeltins