Today I continued my TypeScript learning project after a short break.
Instead of jumping into React right away, I decided to keep working on the backend/domain side of the Candidate Tracker project.
The main lesson today:
- TypeScript is not just useful for components and props.
- It also helps clarify ownership, data flow, and service boundaries.
Some examples from today:
- using
OmitandPartialto define create/update inputs - deciding which fields the caller can change and which fields the service owns
- using generics for reusable helpers like findById and filterByProperty
- typing async repository functions with
Promise<AsyncResult<T>> - using
Promise.allfor independent data loading - splitting async loading into stages when later data depends on earlier results
One useful distinction:
- Services express behavior.
- Repositories decide where data comes from.
That separation should make the next steps cleaner: adding tests first, then replacing seed data with a real database later.
Iām intentionally delaying the frontend a bit.
Not because React is less important, but because I want the domain and data flow to be understandable before putting UI on top.
Next step: tests.
Top comments (0)