1 | import { IObservableArray } from "mobx";
|
2 | import { ExtractCSTWithSTN, IAnyType, IHooksGetter, IType } from "../../internal";
|
3 |
|
4 | export interface IMSTArray<IT extends IAnyType> extends IObservableArray<IT["Type"]> {
|
5 | push(...items: IT["Type"][]): number;
|
6 | push(...items: ExtractCSTWithSTN<IT>[]): number;
|
7 | concat(...items: ConcatArray<IT["Type"]>[]): IT["Type"][];
|
8 | concat(...items: ConcatArray<ExtractCSTWithSTN<IT>>[]): IT["Type"][];
|
9 | concat(...items: (IT["Type"] | ConcatArray<IT["Type"]>)[]): IT["Type"][];
|
10 | concat(...items: (ExtractCSTWithSTN<IT> | ConcatArray<ExtractCSTWithSTN<IT>>)[]): IT["Type"][];
|
11 | splice(start: number, deleteCount?: number): IT["Type"][];
|
12 | splice(start: number, deleteCount: number, ...items: IT["Type"][]): IT["Type"][];
|
13 | splice(start: number, deleteCount: number, ...items: ExtractCSTWithSTN<IT>[]): IT["Type"][];
|
14 | unshift(...items: IT["Type"][]): number;
|
15 | unshift(...items: ExtractCSTWithSTN<IT>[]): number;
|
16 | }
|
17 |
|
18 | export interface IArrayType<IT extends IAnyType> extends IType<readonly IT["CreationType"][] | undefined, IT["SnapshotType"][], IMSTArray<IT>> {
|
19 | hooks(hooks: IHooksGetter<IMSTArray<IAnyType>>): IArrayType<IT>;
|
20 | }
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | export declare function array<IT extends IAnyType>(subtype: IT): IArrayType<IT>;
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | export declare function isArrayType<Items extends IAnyType = IAnyType>(type: IAnyType): type is IArrayType<Items>;
|