schema_registry_mock.d.ts
1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ElementSchemaRegistry } from '@angular/compiler';
import { SchemaMetadata, SecurityContext } from '@angular/core';
export declare class MockSchemaRegistry implements ElementSchemaRegistry {
existingProperties: {
[key: string]: boolean;
};
attrPropMapping: {
[key: string]: string;
};
existingElements: {
[key: string]: boolean;
};
invalidProperties: Array<string>;
invalidAttributes: Array<string>;
constructor(existingProperties: {
[key: string]: boolean;
}, attrPropMapping: {
[key: string]: string;
}, existingElements: {
[key: string]: boolean;
}, invalidProperties: Array<string>, invalidAttributes: Array<string>);
hasProperty(tagName: string, property: string, schemas: SchemaMetadata[]): boolean;
hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean;
allKnownElementNames(): string[];
securityContext(selector: string, property: string, isAttribute: boolean): SecurityContext;
getMappedPropName(attrName: string): string;
getDefaultComponentElementName(): string;
validateProperty(name: string): {
error: boolean;
msg?: string;
};
validateAttribute(name: string): {
error: boolean;
msg?: string;
};
normalizeAnimationStyleProperty(propName: string): string;
normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string | number): {
error: string;
value: string;
};
}