interface OAuthResultInterface { access_token?: string; expires_in?: number; id_token?: string; token_type?: string; created_at?: Date; isComplete(): boolean; } export class OAuthResult implements OAuthResultInterface { public access_token?: string; public expires_in?: number; public id_token?: string; public token_type?: string; public created_at?: Date = new Date(); constructor() {} public isComplete(): boolean { if (!this.access_token || !this.expires_in || !this.id_token || !this.token_type) { return false; } return true; } }