UNPKG

578 BPlain TextView Raw
1import {CollectionBuilder, Collection, SerializePath, SerializeOptions} from './StructureNodes'
2
3export interface ChildResolverOptions {
4 index: number
5 parent: Collection
6 parentPath?: SerializePath
7 serializeOptions?: SerializeOptions
8}
9
10export type ItemChild = CollectionBuilder | Collection | Function | undefined
11
12interface ChildObservable {
13 subscribe: (child: ItemChild | Promise<ItemChild>) => {}
14}
15
16export interface ChildResolver {
17 (itemId: string, options: ChildResolverOptions):
18 | ItemChild
19 | Promise<ItemChild>
20 | ChildObservable
21 | undefined
22}