angular2-json-schema-form
Version:
Angular 2 JSON Schema Form builder
41 lines (40 loc) • 2.79 kB
TypeScript
import { AbstractControl } from '@angular/forms';
export declare type SchemaPrimitiveType = 'string' | 'number' | 'integer' | 'boolean' | 'null';
export declare type SchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'null' | 'object' | 'array';
export declare type JavaScriptPrimitiveType = 'string' | 'number' | 'boolean' | 'null' | 'undefined';
export declare type JavaScriptType = 'string' | 'number' | 'boolean' | 'null' | 'undefined' | 'object' | 'array' | 'map' | 'set' | 'arguments' | 'date' | 'error' | 'function' | 'json' | 'math' | 'regexp';
export declare type PrimitiveValue = string | number | boolean | null | undefined;
export declare type PlainObject = {
[k: string]: any;
};
export interface IValidatorFn {
(c: AbstractControl, i?: boolean): PlainObject;
}
export interface AsyncIValidatorFn {
(c: AbstractControl, i?: boolean): any;
}
export declare function _executeValidators(control: AbstractControl, validators: IValidatorFn[], invert?: boolean): PlainObject[];
export declare function _executeAsyncValidators(control: AbstractControl, validators: AsyncIValidatorFn[], invert?: boolean): any[];
export declare function _mergeObjects(...object: PlainObject[]): PlainObject;
export declare function _mergeErrors(arrayOfErrors: PlainObject[]): PlainObject;
export declare function isDefined(value: any): boolean;
export declare function hasValue(value: any): boolean;
export declare function isEmpty(value: any): boolean;
export declare function isString(value: any): value is string;
export declare function isNumber(value: any, strict?: any): boolean;
export declare function isInteger(value: any, strict?: any): boolean;
export declare function isBoolean(value: any, option?: any): boolean;
export declare function isFunction(item: any): boolean;
export declare function isObject(item: any): boolean;
export declare function isArray(item: any): boolean;
export declare function isMap(item: any): boolean;
export declare function isSet(item: any): boolean;
export declare function getType(value: any, strict?: any): SchemaType;
export declare function isType(value: PrimitiveValue, type: SchemaPrimitiveType): boolean;
export declare function isPrimitive(value: any): boolean;
export declare function toJavaScriptType(value: any, type: SchemaPrimitiveType | SchemaPrimitiveType[], checkIntegers?: boolean): PrimitiveValue;
export declare function toSchemaType(value: PrimitiveValue, types: SchemaPrimitiveType | SchemaPrimitiveType[]): PrimitiveValue;
export declare function isPromise(object: any): object is Promise<any>;
export declare function _convertToPromise(object: any): Promise<any>;
export declare function inArray(item: any | any[], array: any[], allIn?: boolean): boolean;
export declare function xor(value1: any, value2: any): boolean;