Skip to content

Instantly share code, notes, and snippets.

@mightyhorst
Created August 31, 2020 10:59
Show Gist options
  • Save mightyhorst/58e4b4ee805bfe9487da51872c683b16 to your computer and use it in GitHub Desktop.
Save mightyhorst/58e4b4ee805bfe9487da51872c683b16 to your computer and use it in GitHub Desktop.
4. yarn workspaces - example imported files
/**
* @namespace @monorepo/common
* @desc barrel file to export the common files
*/
export * from './models';
/**
* @namespace @monorepo/common
* @interface IUser
*/
export interface IUser{
email: string;
name: string;
}
/**
* @namespace @monorepo/nestjs
*/
import {IUser} from '@monorepo/common';
export class UserService{
users: IUser[] = [];
getUsers(): IUser{
return [
{
email: 'nick@master-class.io',
name: 'Nick Mitchell'
}
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment