From 5cb74b1bf31f44311b4ee54ea320b81f68879f07 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Tue, 15 Mar 2022 19:16:56 +0100 Subject: chore: fix some lint warnings (#613) Co-authored-by: Shinigami --- src/definitions/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/definitions/utils.ts') diff --git a/src/definitions/utils.ts b/src/definitions/utils.ts index b7b826a1..03764c1d 100644 --- a/src/definitions/utils.ts +++ b/src/definitions/utils.ts @@ -1,6 +1,10 @@ // https://stackoverflow.com/a/53395649/4573065 export type AllOf = ['Needs to be all of', T]; +/** + * Creates a function that requires all keys of the generic type to be used as parameters. + * The function itself will return the given parameters. + */ export function allOf(): ( ...array: U & ([T] extends [U[number]] ? unknown : AllOf[]) ) => U & ([T] extends [U[number]] ? unknown : AllOf[]) { -- cgit v1.2.3