-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
fastify.ready(err => {
if (err) throw err
fastify.ws
.on('connection', socket => {
socket.on('message', msg => socket.send(msg)) // Creates an echo server
})
})Errors
[ts] Argument of type '(err: any) => void' is not assignable to parameter of type '() => void'.
(parameter) err: any
[ts] Property 'ws' does not exist on type 'FastifyInstance<{}, {}, {}>'.
Had to tweak it to the following to make it compile
fastify.ready(() => {
fastify['ws']
.on('connection', socket => {
socket.on('message', msg => socket.send(msg)) // Creates an echo server
})
})Metadata
Metadata
Assignees
Labels
No labels