Skip to content

Commit

Permalink
feat(type): OmitFirstParam
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed Jan 28, 2023
1 parent 1f8723d commit b5a778f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/type/src/type-helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any
/* eslint-disable @typescript-eslint/no-explicit-any */

export type Constructor<ClassType = Record<string, unknown>> = new (...args: any[]) => ClassType;

export type MaybePromise<T> = T | Promise<T>;

export type OmitFirstParam<F> = F extends (x: any, ...args: infer A) => infer R ? (...args: A) => R : never;

0 comments on commit b5a778f

Please sign in to comment.