Skip to content

Conversation

@Querela
Copy link

@Querela Querela commented Dec 2, 2025

The TypeScript type SupportedLanguages was a bit out of sync with the languages available via the TCGdex API. Trying to use languages that are available but not defined in the type definition required type-checking opt-outs or as unknown as SupportedLanguages casts.

I updated the list with the languages defined here: https://github.com/tcgdex/cards-database/blob/master/server/compiler/index.ts
I did leave out pt-pt as it is completely empty. (Is it equivalent to "pt", Portuguese (Portugal)?)

Languages were sorted alphabetically but split between international and asia.


Maybe adding extra type definition for both those subsets that are then combined to SupportedLanguages could make sense but I don't see a use-case currently.
What would make sense would be an export of the languages list in JavaScript to be able to iterate over all available languages. But maybe not providing this is also good to discourage the idea. :-)

@advra
Copy link

advra commented Dec 5, 2025

Beat me to it. I realized languages were out of sync. I think for now just merge these as is until a proper use-case is identified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants