export interface IUser { id ? : number ; login ? : string ; } export class User implements IUser { constructor ( public id , public login ) { } } export function getUserIdentifier ( user ) { return user . id ; }