Closed cmaster11 closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
48fe784
) 98.79% compared to head (6322bf0
) 98.79%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I have apparently fallen victim to a common TS fallacy, where I assumed
{}
represented an empty object when instead it represents any non-nullish value. After ESLint started complaining, I discovered a new world 😅https://www.totaltypescript.com/the-empty-object-type-in-typescript
Google thinks a good approach is to use
Record<string, never>
, which prevents any field from being added to the record, mimicking a truly empty object.There are approaches with symbols and so on, but I feel this is a pretty straightforward easy way to at least prevent on the surface any issues.