mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-14 17:43:52 +08:00
This commit updates the BUILD files to specify fine-grained node_module deps by replacing "@typings" comments with actual @npm node module. Moved tools/bazel.rc -> .bazelrc Removed "jasmine" typings from base tsconfig.json Added @bazel/karma to devDependencies, needed for `ts_web_test`
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} = {}) {}
}