Skip to content

Instantly share code, notes, and snippets.

@eduardomoroni
Created June 26, 2018 22:12
Show Gist options
  • Save eduardomoroni/cb4d48c2f7fa125f3089ae8d5edc8909 to your computer and use it in GitHub Desktop.
Save eduardomoroni/cb4d48c2f7fa125f3089ae8d5edc8909 to your computer and use it in GitHub Desktop.
import { Credential, User } from "../entities";
export interface SignInService {
signInWithCredential: (credential: Credential) => Promise<User>;
}
export class SignInInteractor {
signInService: SignInService;
constructor(signInService: SignInService) {
this.signInService = signInService;
}
async signIn(credential: Credential): Promise<User> {
return this.signInService.signInWithCredential(credential);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment