diff --git a/src/utils/types/constructor-parameters.ts b/src/utils/types/constructor-parameters.ts new file mode 100644 index 0000000..e56fab0 --- /dev/null +++ b/src/utils/types/constructor-parameters.ts @@ -0,0 +1,6 @@ +/** + * Obtains the parameters of a constructor function. + * + * @template T - The constructor function. + */ +export type ConstructorParameters unknown> = T extends new (...args: infer P) => unknown ? P : never;