Skip to content

Instantly share code, notes, and snippets.

@pellejacobs
Created August 28, 2016 09:49
Show Gist options
  • Save pellejacobs/498c997ebb8679ea90826177cf8a9bad to your computer and use it in GitHub Desktop.
Save pellejacobs/498c997ebb8679ea90826177cf8a9bad to your computer and use it in GitHub Desktop.
import { Session } from 'express'
let theSession: Session
theSession.user.login
import { User } from "./user";
declare module 'express' {
interface Session {
user: User;
}
}
export class User {
public login: string;
public hashedPassword: string;
constructor(login?: string, password?: string) {
this.login = login || "";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment