main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
524 bytes
|
Line | |
---|
1 | import { 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 | */
|
---|
18 | export declare type Class<P extends List = any[], R extends object = object> = {
|
---|
19 | new (...args: P): R;
|
---|
20 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.