Package Exports
- @angular-devkit/core
- @angular-devkit/core/node
- @angular-devkit/core/node/fs
- @angular-devkit/core/node/testing
- @angular-devkit/core/package.json
- @angular-devkit/core/src/json/schema
- @angular-devkit/core/src/logger
- @angular-devkit/core/src/terminal
- @angular-devkit/core/src/terminal/colors
- @angular-devkit/core/src/utils
- @angular-devkit/core/src/utils/literals
- @angular-devkit/core/src/utils/strings
- @angular-devkit/core/src/workspace/core
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@angular-devkit/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Core
Shared utilities for Angular DevKit.
Exception
Json
Schema
SchemaValidatorResult
export interface SchemaValidatorResult {
success: boolean;
errors?: string[];
}
SchemaValidator
export interface SchemaValidator {
(data: any): Observable<SchemaValidatorResult>;
}
SchemaFormatter
export interface SchemaFormatter {
readonly async: boolean;
validate(data: any): boolean | Observable<boolean>;
}
SchemaRegistry
export interface SchemaRegistry {
compile(schema: Object): Observable<SchemaValidator>;
addFormat(name: string, formatter: SchemaFormatter): void;
}
CoreSchemaRegistry
SchemaRegistry
implementation using https://github.com/epoberezkin/ajv.
Constructor accepts object containing SchemaFormatter
that will be added automatically.
export class CoreSchemaRegistry implements SchemaRegistry {
constructor(formats: { [name: string]: SchemaFormatter} = {}) {}
}