UNPKG

shyft

Version:

Model driven GraphQL API framework

33 lines (32 loc) 1.23 kB
import { Entity } from '../entity/Entity'; import { DataType, DataTypeFunction, DataTypeValidateType } from './DataType'; import { ComplexDataType } from './ComplexDataType'; export declare type ListDataTypeBuildSetupType = { description?: string; itemType: Entity | DataType | ComplexDataType | DataTypeFunction; minItems?: number; maxItems?: number; required?: boolean; }; export declare type ListDataTypeSetupType = { name: string; description: string; itemType: Entity | DataType | ComplexDataType | DataTypeFunction; minItems?: number; maxItems?: number; }; export declare class ListDataType extends ComplexDataType { name: string; description: string; itemType: Entity | ComplexDataType | DataTypeFunction; _itemType: DataType | ComplexDataType; minItems?: number; maxItems?: number; constructor(setup?: ListDataTypeSetupType); _processItemType(): DataType | ComplexDataType; getItemType(): DataType | ComplexDataType; validate: DataTypeValidateType; toString(): string; } export declare const isListDataType: (obj: unknown) => obj is ListDataType; export declare const buildListDataType: (obj: ListDataTypeBuildSetupType) => DataTypeFunction;