codeforboston / codeforboston/maple

Move Shared Types/Utilities out of Functions Subpackage

Open
#1,754 0 comments 0 reactions 1 assignee Claimed by @kiminkim724 View on GitHub
enhancement Ready for Development tech debt
Dominant language
TypeScript
Stars
56
Forks
175
Avg merge
2d 5h
Merged PRs (30d)
13

Description

## Problem

It looks like our imports are causing headaches for our firebase-functions/node20 mandatory tech debt upgrades.

The primary sources of this seem to be shared Typescript types, shared utility functions/constants (e.g. picking the currentGeneralCourt), and the shared `FirebaseFirestore.Timestamp` (which is defined in the same file we initialize Firebase, so we can't even use that type without trying to set up a Firebase connection)..

To simplify this process, we should hoist all of these shared types/utility functions out of `functions/` and into a location that can be shared by both `components`/`pages`, `scripts`, and the `functions` sub-package.

## Success Criteria

- [ ] Hoist any shared types/functions defined in `functions` out to a shared location
- [ ] Of particular note are the Firebase/Firestore type definitions, particularly `Timestamp`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.