UNPKG

524 BTypeScriptView Raw
1import { List } from '../List/List';
2/**
3 * Alias to create/describe a `class`
4 * @param P its constructor parameters
5 * @param R the object it constructs
6 * @returns `class`
7 * @example
8 * ```ts
9 * import {C} from 'ts-toolbelt'
10 *
11 * type test0 = C.Class<[string, number], {a: string, b: number}>
12 *
13 * declare const SomeClass: test0
14 *
15 * const obj = new SomeClass('foo', 42) // {a: string, b: number}
16 * ```
17 */
18export declare type Class<P extends List = any[], R extends object = object> = {
19 new (...args: P): R;
20};