SHARE
TWEET

RepositoryFunctionExample

a guest Aug 25th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { UserRepository, User } from '../../domain/models/user';
  2. import { Uuid } from '../../../shared/domain/uuid';
  3. import { UserMapper } from '../../data/mappers';
  4.  
  5. export const PersistenceUserRepository: UserRepository = (() => {
  6.  
  7.   async function add(user: User): Promise<void> {
  8.     await UserMapper.insert(user);
  9.   }
  10.  
  11.   return {
  12.     add,
  13.   }
  14. })();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top