I have a Lerna project using Typescript with the following structure:
- packages/
- commons/
- types/
- global.d.ts
- types/
- partner/
- user/
- commons/
partner and user are both Express.js apps.
Inside commons I have a types folder with a global.d.ts file:
export {};
declare global {
type UserInformation = {
givenName: string;
familyName: string;
email: string;
id: string;
birthDate: string;
}
}
I want to use this type across all packages (in commons, user and partner).
What is the best way to do it?