Skip to content

Commit cb82edc

Browse files
committed
refactor(core): annotate ComponentMirror object fields as readonly
This commit updates the `inputs` and `outputs` objects of the `ComponentMirror` to mark their properties as readonly.
1 parent 642d1ba commit cb82edc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

goldens/public-api/core/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ export abstract class ComponentFactoryResolver {
236236
// @public
237237
export interface ComponentMirror<C> {
238238
get inputs(): ReadonlyArray<{
239-
propName: string;
240-
templateName: string;
239+
readonly propName: string;
240+
readonly templateName: string;
241241
}>;
242242
get isStandalone(): boolean;
243243
get ngContentSelectors(): ReadonlyArray<string>;
244244
get outputs(): ReadonlyArray<{
245-
propName: string;
246-
templateName: string;
245+
readonly propName: string;
246+
readonly templateName: string;
247247
}>;
248248
get selector(): string;
249249
get type(): Type<C>;

packages/core/src/render3/component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ export interface ComponentMirror<C> {
106106
/**
107107
* The inputs of the component.
108108
*/
109-
get inputs(): ReadonlyArray<{propName: string, templateName: string}>;
109+
get inputs(): ReadonlyArray<{readonly propName: string, readonly templateName: string}>;
110110
/**
111111
* The outputs of the component.
112112
*/
113-
get outputs(): ReadonlyArray<{propName: string, templateName: string}>;
113+
get outputs(): ReadonlyArray<{readonly propName: string, readonly templateName: string}>;
114114
/**
115115
* Selector for all <ng-content> elements in the component.
116116
*/

0 commit comments

Comments
 (0)