Writing Firebase functions
Firebase functions are convenient and powerful. But, sometimes you need to know the correct spells to make your magic work efficiently and effectively. Although we write all the code inside index.js, we have to learn many more things, and that happens only with practice. If you choose TypeScript while creating the project - if you want to explore the TypeScript way of using Firebase functions - it's almost the same, but with a few contract changes.
The file type when we choose TypeScript will be .ts; therefore, our index.js will be index.ts. Every time you deploy the code, you need to make sure the TypeScript code transpiled and then hosted. In case of TypeScript, we need to configure tsconfig.json; follow these ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access