How do I read context in middleware?
Hi all,
I have a middleware function in which I want to read the contents of 'context' to determine if I need to do something or not. Like the screenshot shows, context is of type 'never' but when I console.log the context out, I do see some values.
How should I do this?

3 Replies
absent-sapphire•2mo ago
Have you already tried typing the {next, contex} object pair instead of leaving it untyped?
exotic-emerald•2mo ago
you need to add
middleware([authMiddlware])
to sidMiddlware
flat-fuchsiaOP•2mo ago
ah nice, thanks