Function: resolveMachineAcrossLanguages()
resolveMachineAcrossLanguages<
T>(candidates,fetchOne):Promise<{language:string;machine:T; } |null>
Defined in: composables/shared/utils/machineLanguage.ts:69
Call fetchOne with each candidate language until one resolves.
Returns null when every candidate reported "not found" — that is a real
answer (the slug exists in no language we know of), and the caller should say
so rather than render an empty listing. Any OTHER failure is rethrown
immediately: a network blip or an auth error must not be retried three times
and then reported as a missing machine.
Type Parameters
T
T
Parameters
candidates
string[]
fetchOne
(language) => Promise<T | null | undefined>
Returns
Promise<{ language: string; machine: T; } | null>