😊

JWT Authentication【9Types Extend】

2022/10/11に公開

JWT Authentication【9Types Extend】

YouTube: https://youtu.be/tK-mml8n7-4

@types/express/index.d.ts
// req.user
declare namespace Express {
  export interface Request {
    user?: any
  }
}
tsconfig.json
{
  "compilerOptions": {
    "sourceMap": true,
    "outDir": "dist",
    "strict": true,
    "lib": ["esnext"],
    "esModuleInterop": true,
    "typeRoots": ["@types", "node_modules/@types"]
  }
}

Discussion