Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tuanngominh/eddcb2818df345c344343be44aa2c9d6 to your computer and use it in GitHub Desktop.
Save tuanngominh/eddcb2818df345c344343be44aa2c9d6 to your computer and use it in GitHub Desktop.
Ideal solution for sharing type between angular and firebase cloud function
// cloud function
import {type1} from `@app/shared/feature1`
// angular
import {type1} from `@app/shared/feature1`
// angular's tsconfig.json
{
"compilerOptions": {
"paths": {
"@app/shared": ["../../shared"]
}
}
}
// folder layout
/*
cloud-functions
angular
shared
feature1
type1.ts
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment