diff options
| author | ST-DDT <[email protected]> | 2022-03-15 19:16:56 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-15 19:16:56 +0100 |
| commit | 5cb74b1bf31f44311b4ee54ea320b81f68879f07 (patch) | |
| tree | bfe4e31ed4384be8b7b47826cf1ceb98227e9100 /src/definitions | |
| parent | 09487b6b3a6e6cc3de0303851b9913ecdf1390dc (diff) | |
| download | faker-5cb74b1bf31f44311b4ee54ea320b81f68879f07.tar.xz faker-5cb74b1bf31f44311b4ee54ea320b81f68879f07.zip | |
chore: fix some lint warnings (#613)
Co-authored-by: Shinigami <[email protected]>
Diffstat (limited to 'src/definitions')
| -rw-r--r-- | src/definitions/utils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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<T> = ['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<T>(): <U extends T[]>( ...array: U & ([T] extends [U[number]] ? unknown : AllOf<T>[]) ) => U & ([T] extends [U[number]] ? unknown : AllOf<T>[]) { |
