Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Schniz committed Feb 15, 2022
1 parent 90d22d3 commit 5f3a55d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next/server/next-server.ts
Expand Up @@ -1415,15 +1415,15 @@ function enhanceIncomingMessage<T extends IncomingMessage>(
return new Proxy<T>(base, {
get(target, name) {
if (name in stream) {
const v = stream[name]
const v = stream[name as keyof NodeStreams.Readable]
if (typeof v === 'function') {
return v.bind(stream)
} else {
return v
}
}

return target[name]
return target[name as keyof T]
},
})
}

0 comments on commit 5f3a55d

Please sign in to comment.