fix(benchpress): Ensure future-proof correct initialization order (#60025)

Future changes to initialization order can cause this previously OK code to start having compiler erroring like: `TS2729: Property 'foo' is used before its initialization.`

PR Close #60025
This commit is contained in:
Trevor Florence 2025-02-19 14:26:59 -07:00 committed by kirjs
parent af5155f197
commit 7a8e8f37c0

View file

@ -46,9 +46,11 @@ export class JsonFileReporter extends Reporter {
@Inject(Options.NOW) private _now: Function,
) {
super();
this.textReporter = new TextReporterBase(this._columnWidth, this._description);
}
private textReporter = new TextReporterBase(this._columnWidth, this._description);
private textReporter: TextReporterBase;
override reportMeasureValues(measureValues: MeasureValues): Promise<any> {
return Promise.resolve(null);