MCPcopy Create free account
hub / github.com/angular/angular / appendDeepSchemaChecks

Method appendDeepSchemaChecks

packages/compiler/src/typecheck/ops/scope.ts:826–866  ·  view source on GitHub ↗
(nodes: Node[])

Source from the content-addressed store, hash-verified

824 }
825
826 private appendDeepSchemaChecks(nodes: Node[]): void {
827 for (const node of nodes) {
828 if (!(node instanceof Element || node instanceof Template)) {
829 continue;
830 }
831
832 if (node instanceof Element) {
833 const claimedInputs = new Set<string>();
834 let directives = this.tcb.boundTarget.getDirectivesOfNode(node);
835
836 for (const dirNode of node.directives) {
837 const directiveResults = this.tcb.boundTarget.getDirectivesOfNode(dirNode);
838
839 if (directiveResults !== null && directiveResults.length > 0) {
840 directives ??= [];
841 directives.push(...directiveResults);
842 }
843 }
844
845 let hasDirectives: boolean;
846 if (directives === null || directives.length === 0) {
847 hasDirectives = false;
848 } else {
849 hasDirectives = true;
850 for (const dir of directives) {
851 for (const propertyName of dir.inputs.propertyNames) {
852 claimedInputs.add(propertyName);
853 }
854 }
855 }
856 const isForeign = this.tcb.boundTarget.getForeignComponent(node) !== null;
857 if (!isForeign) {
858 this.opQueue.push(
859 new TcbDomSchemaCheckerOp(this.tcb, node, !hasDirectives, claimedInputs),
860 );
861 }
862 }
863
864 this.appendDeepSchemaChecks(node.children);
865 }
866 }
867
868 private appendIcuExpressions(node: Icu): void {
869 for (const variable of Object.values(node.vars)) {

Callers 1

appendNodeMethod · 0.95

Calls 4

getDirectivesOfNodeMethod · 0.65
addMethod · 0.65
getForeignComponentMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected