Open TheDutchCoder opened 5 months ago
Same here, solved by manually overriding the $device
instance property in the types/index.d.ts
import { ComponentCustomProperties } from 'vue'
import { Device } from '@nuxtjs/device'
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$device: Device
}
}
I'm having issues getting types to work with this Nuxt 3 module and plugins. Whenever
$device
is accessed fromnuxtApp
, there are no types defined.Plugins allow you to extend the $device object, but because it's missing types, the custom extensions are marked as
Property 'isInAppBrowser' does not exist on type 'Device'.ts(2339)