Re:Use the Gemini API with OpenAI Fallback in TypeScript
by triyambakam on Sunday April 06, 2025 @08:14PM
(#43606191)
So, like, which programming language do you think is not ugly? J? K?
Re:Use the Gemini API with OpenAI Fallback in TypeScript
by sprobertson on Sunday April 06, 2025 @06:42PM
(#43605598)
which of those words are large?
Re:Use the Gemini API with OpenAI Fallback in TypeScript
by AcquiescentWolf on Sunday April 06, 2025 @08:02PM
(#43606124)
Ah yes, such large words like const, function, or return, that only exist in TypeScript and PHP.
Re:Use the Gemini API with OpenAI Fallback in TypeScript
by dcre on Sunday April 06, 2025 @10:14PM
(#43606902)
Silly comment, but I concede this bit is very ugly — they should have extracted the inner type to an alias and used that twice.
options: [
Omit<ChatCompletionParseParams, 'model'> & { model: Model },
Omit<ChatCompletionParseParams, 'model'> & { model: Model },
],
like this type Options = Omit<ChatCompletionParseParams, 'model'> & { model: Model }
options: [Options, Options]
export const
function
type
return
etc
This makes scanning through the code really hard because your eye has to jump horizontally.