import { IObservableArray, IArrayWillChange, IArrayWillSplice, IArrayChange, IArraySplice } from "mobx"; import { ComplexType, IType, IComplexType } from '../Type'; import { TypeFlags } from '../type-flags'; import { IJsonPatch, IStateTreeNode } from '../../core/NodeUtils'; import { IContext, IValidationResult } from "../type-checker"; import { ObjectNode } from "../../core/ObjectNode"; import { INode } from '../../core/interface'; export declare function arrayToString(this: IObservableArray & IStateTreeNode): string; export declare class ArrayType extends ComplexType> { readonly shouldAttachNode: boolean; subType: IType; readonly flags: TypeFlags; constructor(name: string, subType: IType); readonly valueType: IType>; describe(): string; createNewInstance: () => IObservableArray; finalizeNewInstance: (node: ObjectNode, snapshot: any) => void; instantiate(parent: ObjectNode | null, subpath: string, environment: any, snapshot: S): INode; getValue(node: ObjectNode): any; getSnapshot(node: ObjectNode): any; getDefaultSnapshot(): any[]; applySnapshot(node: ObjectNode, snapshot: any[]): void; applyPatchLocally(node: ObjectNode, subpath: string, patch: IJsonPatch): void; hasNestedFields(): boolean; getChildren(node: ObjectNode): INode[]; getChildField(node: ObjectNode, key: string): INode; getChildType(key: string): IType; removeChild(node: ObjectNode, subpath: string): void; didChange(this: {}, change: IArrayChange | IArraySplice): void; willChange(change: IArrayWillChange | IArrayWillSplice): Object | null; isValidSnapshot(value: any, context: IContext): IValidationResult; } export declare function array(subtype: IType): IComplexType>; export declare function getArrayType(object: IStateTreeNode): ArrayType;