AJGranowski / reddit-expanded-community-filter-userscript

A userscript to filter muted communities from /r/all using your account preferences.
MIT License
2 stars 2 forks source link

Add translation type check #392

Closed AJGranowski closed 1 month ago

AJGranowski commented 1 month ago

What are these changes?

Adds verification to translation files before type casting them.

Why are these changes being made?

.addTranslation(zh as typeof zh & {locale: "zh"}); was kinda gross.
It would be nice if we could import JSON files as const, but since we can't do that quite yet I figured this would be the next best thing.

Checklist before merging

AJGranowski commented 1 month ago

LGTM

coveralls commented 1 month ago

Coverage Status

coverage: 90.667% (-0.4%) from 91.057% when pulling a14a72f1c69eaa4389b484139ec3bd47a4ab8fee on rc into 65238e2f7a4599b2be5fa42bf46332a75c61c2b4 on mainline.