Skip to content

Commit 6e60f2e

Browse files
committed
ctn -> ctor
1 parent 9e1c59f commit 6e60f2e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

glean/src/core/context.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,16 @@ export class Context {
262262
* If the metric map already contains this constructor, this is a no-op.
263263
*
264264
* @param type A string identifying the given metric type.
265-
* @param ctn The metric constructor.
265+
* @param ctor The metric constructor.
266266
*/
267267
static addSupportedMetric(
268268
type: string,
269-
ctn: new (v: unknown) => Metric<JSONValue, JSONValue>
269+
ctor: new (v: unknown) => Metric<JSONValue, JSONValue>
270270
): void {
271271
if (type in Context.instance._supportedMetrics) {
272272
return;
273273
}
274274

275-
Context.instance._supportedMetrics[type] = ctn;
275+
Context.instance._supportedMetrics[type] = ctor;
276276
}
277277
}

glean/src/core/metrics/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ export abstract class MetricType implements CommonMetricData {
5757
constructor(
5858
type: string,
5959
meta: CommonMetricData,
60-
metricCtn?: new (v: unknown) => Metric<JSONValue, JSONValue>
60+
metricCtor?: new (v: unknown) => Metric<JSONValue, JSONValue>
6161
) {
62-
if (metricCtn) {
63-
Context.addSupportedMetric(type, metricCtn);
62+
if (metricCtor) {
63+
Context.addSupportedMetric(type, metricCtor);
6464
}
6565
this.type = type;
6666

glean/src/core/metrics/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export function createMetric(type: string, v: unknown): Metric<JSONValue, JSONVa
2626
Context.addSupportedMetric(type, LabeledMetric);
2727
}
2828

29-
const ctn = Context.getSupportedMetric(type);
30-
if (!ctn) {
29+
const ctor = Context.getSupportedMetric(type);
30+
if (!ctor) {
3131
throw new Error(`Unable to create metric of unknown type ${type}`);
3232
}
3333

34-
return new ctn(v);
34+
return new ctor(v);
3535
}
3636

3737
/**

0 commit comments

Comments
 (0)