Skip to content

Instantly share code, notes, and snippets.

View gabrielyotoo's full-sized avatar
💖
Doing my best

Gabriel Freitas Yamamoto gabrielyotoo

💖
Doing my best
View GitHub Profile
@gabrielyotoo
gabrielyotoo / thunk-with-multiple-params.ts
Last active May 30, 2024 13:26
[Function] - Thunk function that receives other function's parameters as its own parameters
const thunkFunctionMultiParams =
<T extends unknown[]>(fn: (...params: T) => void, ...params: T) =>
fn(...params)
};