Skip to content

Commit

Permalink
refactor(core): annotate ComponentMirror object fields as readonly (a…
Browse files Browse the repository at this point in the history
…ngular#46685)

This commit updates the `inputs` and `outputs` objects of the `ComponentMirror` to mark their properties as readonly.

PR Close angular#46685
  • Loading branch information
AndrewKushnir committed Jul 15, 2022
1 parent 0628ed3 commit 8d59860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions goldens/public-api/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ export abstract class ComponentFactoryResolver {
// @public
export interface ComponentMirror<C> {
get inputs(): ReadonlyArray<{
propName: string;
templateName: string;
readonly propName: string;
readonly templateName: string;
}>;
get isStandalone(): boolean;
get ngContentSelectors(): ReadonlyArray<string>;
get outputs(): ReadonlyArray<{
propName: string;
templateName: string;
readonly propName: string;
readonly templateName: string;
}>;
get selector(): string;
get type(): Type<C>;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/render3/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ export interface ComponentMirror<C> {
/**
* The inputs of the component.
*/
get inputs(): ReadonlyArray<{propName: string, templateName: string}>;
get inputs(): ReadonlyArray<{readonly propName: string, readonly templateName: string}>;
/**
* The outputs of the component.
*/
get outputs(): ReadonlyArray<{propName: string, templateName: string}>;
get outputs(): ReadonlyArray<{readonly propName: string, readonly templateName: string}>;
/**
* Selector for all <ng-content> elements in the component.
*/
Expand Down

0 comments on commit 8d59860

Please sign in to comment.