Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mpppk committed Jun 3, 2024
1 parent 7dc5309 commit 3c69d00
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/type-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ export type ExpectExtends<VALUE, EXPECTED> = EXPECTED extends VALUE
? true
: false;
export type ExpectValidArgs<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
FUNC extends (...args: any[]) => any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ARGS extends any[],
> = ARGS extends Parameters<FUNC> ? true : false;

export type UnionToIntersection<U> = (
U extends any ? (k: U) => void : never
) extends (k: infer I) => void
? I
: never;
export type UnionToIntersection<U> =
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(U extends any ? (k: U) => void : never) extends (k: infer I) => void
? I
: never;

0 comments on commit 3c69d00

Please sign in to comment.