Skip to content

Commit

Permalink
Augment Express Request definition with User model. Fixes microsoft#221
Browse files Browse the repository at this point in the history
Thanks!
  • Loading branch information
peterblazejewicz committed Sep 4, 2019
1 parent 722ebf8 commit e1166e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/types/express-fix.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import express from 'express';
import { UserDocument } from '../models/User';

declare module 'express' {
export interface User extends UserDocument {}
export interface Request {
user?: User;
}
}

0 comments on commit e1166e3

Please sign in to comment.