UNPKG

aoc-utils

Version:

Utilities for programatically interacting with Advent of Code

12 lines (11 loc) 339 B
type AnyFunction = (...args: any) => any; type GetParameters<T extends AnyFunction> = Parameters<T> extends [ unknown, ...infer Rest ] ? Rest : never; export type Config = { token: string; year: `${number}`; }; export type UtilityFunction<T extends AnyFunction> = (...params: GetParameters<T>) => ReturnType<T>; export {};