luchillo17
luchillo172mo ago

You mean these? I've had a couple of

You mean these? I've had a couple of type issues and I just had to enforce some types sometimes, afaik it was not the paths but instead crazy type inference due to me doing meta programming with string interpolation `.
"paths": {
"@/*": ["../src/*"],
"@convex/*": ["./*"]
},
"paths": {
"@/*": ["../src/*"],
"@convex/*": ["./*"]
},
Like this to make generic functions to work with 5 different tables:
export async function searchByTranslations<
BTable extends MasterBaseTableName,
TTable extends ``${BTable}_translations``,
>(
export async function searchByTranslations<
BTable extends MasterBaseTableName,
TTable extends ``${BTable}_translations``,
>(
3 Replies
Jacob Kim
Jacob Kim2mo ago
I am intrigued by this. can you explain what searchByTranslations is used for?
luchillo17
luchillo17OP2mo ago
I18n support for masters, basically to search by the translated text, basically the translation has a folded version (removed tildes, special characters and lowercased), this function supports text search for any table that has a searchString property (by convention tables suffixed with _translations).
Jacob Kim
Jacob Kim2mo ago
fascinating

Did you find this page helpful?