File tree Expand file tree Collapse file tree 5 files changed +12
-18
lines changed
packages/angular_devkit/core Expand file tree Collapse file tree 5 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,7 @@ export class NodeModuleJobRegistry<MinimumArgumentValueT extends JsonValue = Jso
5151 return of ( null ) ;
5252 }
5353
54- // TODO: this should be unknown
55- // tslint:disable-next-line:no-any
56- function _getValue ( ...fields : any [ ] ) {
54+ function _getValue ( ...fields : unknown [ ] ) {
5755 return fields . find ( x => schema . isJsonSchema ( x ) ) || true ;
5856 }
5957
Original file line number Diff line number Diff line change @@ -453,10 +453,10 @@ export function isJobHandler<
453453 A extends JsonValue ,
454454 I extends JsonValue ,
455455 O extends JsonValue ,
456- // TODO: this should be unknown
457- // tslint:disable-next-line:no-any
458- > ( value : any ) : value is JobHandler < A , I , O > {
459- return typeof value == 'function'
460- && typeof value . jobDescription == 'object'
461- && value . jobDescription !== null ;
456+ > ( value : unknown ) : value is JobHandler < A , I , O > {
457+ const job = value as JobHandler < A , I , O > ;
458+
459+ return typeof job == 'function'
460+ && typeof job . jobDescription == 'object'
461+ && job . jobDescription !== null ;
462462}
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export interface SchemaValidator {
6969
7070export interface SchemaFormatter {
7171 readonly async : boolean ;
72+ // TODO should be unknown remove before next major release
7273 // tslint:disable-next-line:no-any
7374 validate ( data : any ) : boolean | Observable < boolean > ;
7475}
@@ -84,13 +85,11 @@ export interface SmartDefaultProvider<T> {
8485
8586export interface SchemaKeywordValidator {
8687 (
87- // tslint:disable-next-line:no-any
8888 data : JsonValue ,
8989 schema : JsonValue ,
9090 parent : JsonObject | JsonArray | undefined ,
9191 parentProperty : string | number | undefined ,
9292 pointer : JsonPointer ,
93- // tslint:disable-next-line:no-any
9493 rootData : JsonValue ,
9594 ) : boolean | Observable < boolean > ;
9695}
Original file line number Diff line number Diff line change @@ -447,8 +447,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
447447 }
448448
449449 addFormat ( format : SchemaFormat ) : void {
450- // tslint:disable-next-line:no-any
451- const validate = ( data : any ) => {
450+ const validate = ( data : unknown ) => {
452451 const result = format . formatter . validate ( data ) ;
453452
454453 if ( typeof result == 'boolean' ) {
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88import { clean } from '../../utils' ;
9- import { JsonObject , isJsonObject } from '../interface' ;
9+ import { JsonObject , JsonValue , isJsonObject } from '../interface' ;
1010
1111/**
1212 * A specialized interface for JsonSchema (to come). JsonSchemas are also JsonObject.
@@ -16,10 +16,8 @@ import { JsonObject, isJsonObject } from '../interface';
1616export type JsonSchema = JsonObject | boolean ;
1717
1818
19- // TODO: this should be unknown
20- // tslint:disable-next-line:no-any
21- export function isJsonSchema ( value : any ) : value is JsonSchema {
22- return isJsonObject ( value ) || value === false || value === true ;
19+ export function isJsonSchema ( value : unknown ) : value is JsonSchema {
20+ return isJsonObject ( value as JsonValue ) || value === false || value === true ;
2321}
2422
2523/**
You can’t perform that action at this time.
0 commit comments