#Passport, typing the user object?

1 messages · Page 1 of 1 (latest)

nimble prism
#

Personally, I like creating my own interface that extends the underlying Request obejct (whether that's the fastify or express one) and addwhatever properties I need to to it

#

Usually no, I make a dedicated file for it, just a standard ts file. I try to avoid writing my own .d.ts files for personal reasons

unkempt jewel
nimble prism
#

It's an interface.

export interface UserRequest extends Request {
  user: UserType
}