UNPKG

431 BTypeScriptView Raw
1import { Class } from './Class';
2/**
3 * Get the parameters of a class constructor
4 * @param C **typeof** class
5 * @returns [[List]]
6 * @example
7 * ```ts
8 * import {C} from 'ts-toolbelt'
9 *
10 * type User = C.Class<[string, string], {firstname: string, lastname: string}>
11 *
12 * type test0 = C.Parameters<User> // [string, string]
13 * ```
14 */
15export declare type Parameters<C extends Class> = C extends Class<infer P, any> ? P : never;