Solution for https://jsfiddle.net/mladylukas/9qmusLok/
-
Clone this repository
-
Run any local development http server like VS Code Live Server or Node live-server:
// Dynamic function arguments currying in TypeScript | |
// - For functions with any fixed arguments it keeps currying the function | |
// until all fixed arguments are provided, then returns the result | |
// - For functions with dynamic arguments only it keeps currying the function | |
// as long as the call provides any spices, otherwise returns the result | |
// - Source: https://gist.github.com/iki/6472c0775cc0847fc667c01524cafa6b | |
type Args = readonly unknown[] | |
type Func<A extends Args = any[], R = any> = (...args: A) => R | |
type Slices<A extends Args, I extends Args = []> = A extends readonly [infer F, ...infer R] |
Solution for https://jsfiddle.net/mladylukas/9qmusLok/
Clone this repository
Run any local development http server like VS Code Live Server or Node live-server:
Usage: devops [options] <command> [args]
Sourcing:
Sourcing script defines functions and passes entrypoint function to init.
Samples when devops is located in the same/relative/absolute path:
. "`dirname "${BASH_SOURCE[0]}"`/devops" && init <entrypoint> "$@"