MCPcopy
hub / github.com/angular/angular / BoundAttribute

Class BoundAttribute

packages/compiler/src/render3/r3_ast.ts:84–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84export class BoundAttribute implements Node {
85 constructor(
86 public name: string,
87 public type: BindingType,
88 public securityContext: SecurityContext,
89 public value: AST,
90 public unit: string | null,
91 public sourceSpan: ParseSourceSpan,
92 readonly keySpan: ParseSourceSpan,
93 public valueSpan: ParseSourceSpan | undefined,
94 public i18n: I18nMeta | undefined,
95 ) {}
96
97 static fromBoundElementProperty(prop: BoundElementProperty, i18n?: I18nMeta): BoundAttribute {
98 if (prop.keySpan === undefined) {
99 throw new Error(
100 `Unexpected state: keySpan must be defined for bound attributes but was not for ${prop.name}: ${prop.sourceSpan}`,
101 );
102 }
103 return new BoundAttribute(
104 prop.name,
105 prop.type,
106 prop.securityContext,
107 prop.value,
108 prop.unit,
109 prop.sourceSpan,
110 prop.keySpan,
111 prop.valueSpan,
112 i18n,
113 );
114 }
115
116 visit<Result>(visitor: Visitor<Result>): Result {
117 return visitor.visitBoundAttribute(this);
118 }
119}
120
121export class BoundEvent implements Node {
122 constructor(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…