NuxtN
Nuxt15mo ago
12 replies
UnRunDead

How to use nitro types

I setuped a basic nuxt app witht the default folder structure, so the server folder contains a tsconfig.json with

{
  "extends": "../.nuxt/tsconfig.server.json"
}


I am using websockets for communication but there is a typescript error

// Cannot find name 'Peer'.ts(2304)
// Cannot find name 'Message'.ts(2304)
export default function onCreateGame(peer: Peer, message: Message) {
}


Where should I import them from?
Was this page helpful?