Skip to content

Commit

Permalink
[Maps] Mark instance state as readonly (#60557) (#60566)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck authored Mar 19, 2020
1 parent 78a094e commit c4d9bed
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions x-pack/legacy/plugins/maps/public/layers/fields/es_agg_field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export interface IESAggField extends IField {
}

export class ESAggField implements IESAggField {
private _source: IESAggSource;
private _origin: FIELD_ORIGIN;
private _label?: string;
private _aggType: AGG_TYPE;
private _esDocField?: IField | undefined;
private readonly _source: IESAggSource;
private readonly _origin: FIELD_ORIGIN;
private readonly _label?: string;
private readonly _aggType: AGG_TYPE;
private readonly _esDocField?: IField | undefined;

constructor({
label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { TOP_TERM_PERCENTAGE_SUFFIX } from '../../../common/constants';
import { FIELD_ORIGIN } from '../../../common/constants';

export class TopTermPercentageField implements IESAggField {
private _topTermAggField: IESAggField;
private readonly _topTermAggField: IESAggField;

constructor(topTermAggField: IESAggField) {
this._topTermAggField = topTermAggField;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export interface IStyleProperty {
}

export class AbstractStyleProperty implements IStyleProperty {
private _options: StylePropertyOptions;
private _styleName: string;
private readonly _options: StylePropertyOptions;
private readonly _styleName: string;

constructor(options: StylePropertyOptions, styleName: string) {
this._options = options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const sourceDescriptor: XYZTMSSourceDescriptor = {
};

class MockTileSource implements ITMSSource {
private _descriptor: XYZTMSSourceDescriptor;
private readonly _descriptor: XYZTMSSourceDescriptor;
constructor(descriptor: XYZTMSSourceDescriptor) {
this._descriptor = descriptor;
}
Expand Down

0 comments on commit c4d9bed

Please sign in to comment.