Answers for "Property 'userId' does not exist on type 'Session & Partial<SessionData>'.ts(2339)"

1

Property 'userId' does not exist on type 'Session & Partial<SessionData>'.ts(2339)

//After updating express-session, it changes from sessionData to session.
//so you'll have to merge declarations


declare module "express-session" {
  interface Session {
    user: string;
  }
}
Posted by: Guest on December-29-2020
0

Property 'isAuth' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs>'

// create file custom.d.ts and declare the following

declare namespace Express {
  export interface Request {
      user: any;
  }
  export interface Response {
      user: any;
  }
}
Posted by: Guest on August-25-2020

Code answers related to "Property 'userId' does not exist on type 'Session & Partial<SessionData>'.ts(2339)"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language