@sdeverywhere/check-core 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- type SourceName = string;
2
- type VarId = string;
3
- type DatasetKey = string;
4
- type Dataset = Map<number, number>;
5
- type DatasetMap = Map<DatasetKey, Dataset>;
6
-
1
+ //#region src/_shared/types.d.ts
2
+ export type SourceName = string;
3
+ export type VarId = string;
4
+ export type DatasetKey = string;
5
+ export type Dataset = Map<number, number>;
6
+ export type DatasetMap = Map<DatasetKey, Dataset>;
7
+ //#endregion
8
+ //#region src/_shared/scenario-spec-types.d.ts
7
9
  /**
8
10
  * Specifies a constant override that will be applied when running the model.
9
11
  *
@@ -11,11 +13,11 @@ type DatasetMap = Map<DatasetKey, Dataset>;
11
13
  * defined min/max ranges), constant overrides can modify ANY constant in the model
12
14
  * when the `customConstants` feature is enabled.
13
15
  */
14
- interface ConstantOverride {
15
- /** The variable ID of the constant to be overridden. */
16
- varId: VarId;
17
- /** The new value for the constant. */
18
- value: number;
16
+ export interface ConstantOverride {
17
+ /** The variable ID of the constant to be overridden. */
18
+ varId: VarId;
19
+ /** The new value for the constant. */
20
+ value: number;
19
21
  }
20
22
  /**
21
23
  * Specifies a lookup override that will be applied when running the model.
@@ -28,101 +30,103 @@ interface ConstantOverride {
28
30
  * Lookup overrides are only effective when the `customLookups` feature is
29
31
  * enabled in the bundle.
30
32
  */
31
- interface LookupOverride {
32
- /** The variable ID of the lookup or data variable to be overridden. */
33
- varId: VarId;
34
- /**
35
- * The lookup data as a flat array of (x,y) pairs. If undefined, the lookup
36
- * data will be reset to the original data.
37
- */
38
- points?: Float64Array;
33
+ export interface LookupOverride {
34
+ /** The variable ID of the lookup or data variable to be overridden. */
35
+ varId: VarId;
36
+ /**
37
+ * The lookup data as a flat array of (x,y) pairs. If undefined, the lookup
38
+ * data will be reset to the original data.
39
+ */
40
+ points?: Float64Array;
39
41
  }
40
42
  /** A unique identifier for the scenario, derived from its input settings. */
41
- type ScenarioSpecUid = string;
42
- type InputPosition = 'at-default' | 'at-minimum' | 'at-maximum';
43
- interface PositionSetting {
44
- kind: 'position';
45
- inputVarId: VarId;
46
- position: InputPosition;
47
- }
48
- interface ValueSetting {
49
- kind: 'value';
50
- inputVarId: VarId;
51
- value: number;
52
- }
53
- type InputSetting = PositionSetting | ValueSetting;
54
- interface InputSettingsSpec {
55
- kind: 'input-settings';
56
- uid: ScenarioSpecUid;
57
- settings: InputSetting[];
58
- }
59
- interface AllInputsSpec {
60
- kind: 'all-inputs';
61
- uid: ScenarioSpecUid;
62
- position: InputPosition;
63
- }
64
- type ScenarioSpec = InputSettingsSpec | AllInputsSpec;
65
-
66
- interface DatasetsResult {
67
- /**
68
- * The map of datasets for the scenario.
69
- */
70
- datasetMap: DatasetMap;
71
- /**
72
- * The number of milliseconds that elapsed when running the model, or undefined if the model
73
- * wasn't run for this scenario.
74
- */
75
- modelRunTime?: number;
43
+ export type ScenarioSpecUid = string;
44
+ export type InputPosition = 'at-default' | 'at-minimum' | 'at-maximum';
45
+ export interface PositionSetting {
46
+ kind: 'position';
47
+ inputVarId: VarId;
48
+ position: InputPosition;
49
+ }
50
+ export interface ValueSetting {
51
+ kind: 'value';
52
+ inputVarId: VarId;
53
+ value: number;
54
+ }
55
+ export type InputSetting = PositionSetting | ValueSetting;
56
+ export interface InputSettingsSpec {
57
+ kind: 'input-settings';
58
+ uid: ScenarioSpecUid;
59
+ settings: InputSetting[];
60
+ }
61
+ export interface AllInputsSpec {
62
+ kind: 'all-inputs';
63
+ uid: ScenarioSpecUid;
64
+ position: InputPosition;
65
+ }
66
+ export type ScenarioSpec = InputSettingsSpec | AllInputsSpec;
67
+ //#endregion
68
+ //#region src/_shared/data-source.d.ts
69
+ export interface DatasetsResult {
70
+ /**
71
+ * The map of datasets for the scenario.
72
+ */
73
+ datasetMap: DatasetMap;
74
+ /**
75
+ * The number of milliseconds that elapsed when running the model, or undefined if the model
76
+ * wasn't run for this scenario.
77
+ */
78
+ modelRunTime?: number;
76
79
  }
77
80
  /**
78
81
  * Options for the `getDatasetsForScenario` method.
79
82
  */
80
- interface GetDatasetsOptions {
81
- /**
82
- * If defined, override the values for the specified constant variables.
83
- *
84
- * Unlike input settings (which work with pre-declared input variables), constant
85
- * overrides can modify ANY constant in the model when the `customConstants` feature
86
- * is enabled.
87
- *
88
- * Note that constant overrides do NOT persist across `getDatasetsForScenario` calls.
89
- * They must be provided each time you want to override constants.
90
- */
91
- constants?: ConstantOverride[];
92
- /**
93
- * If defined, override the data for the specified lookup or data variables.
94
- *
95
- * The data provided here will override the default data in the generated model
96
- * for each variable identified by `varId`. Lookup overrides are only effective
97
- * when the `customLookups` feature is enabled in the bundle.
98
- *
99
- * Note that lookup overrides MAY OR MAY NOT persist across `getDatasetsForScenario`
100
- * calls, depending on the underlying model/runtime implementation. If you want to
101
- * ensure that previously-applied lookup overrides do not take effect on subsequent
102
- * runs, pass an undefined `points` array for the relevant variable to cause the
103
- * lookup data to be reset to its original data.
104
- */
105
- lookups?: LookupOverride[];
106
- }
107
- interface DataSource {
108
- /**
109
- * Return the datasets that result from running the given scenario.
110
- *
111
- * @param scenarioSpec The scenario spec that defines the inputs for the model run.
112
- * @param datasetKeys The keys of the datasets to be fetched.
113
- * @param options Optional configuration including constant and lookup overrides.
114
- */
115
- getDatasetsForScenario(scenarioSpec: ScenarioSpec, datasetKeys: DatasetKey[], options?: GetDatasetsOptions): Promise<DatasetsResult>;
116
- }
117
-
83
+ export interface GetDatasetsOptions {
84
+ /**
85
+ * If defined, override the values for the specified constant variables.
86
+ *
87
+ * Unlike input settings (which work with pre-declared input variables), constant
88
+ * overrides can modify ANY constant in the model when the `customConstants` feature
89
+ * is enabled.
90
+ *
91
+ * Note that constant overrides do NOT persist across `getDatasetsForScenario` calls.
92
+ * They must be provided each time you want to override constants.
93
+ */
94
+ constants?: ConstantOverride[];
95
+ /**
96
+ * If defined, override the data for the specified lookup or data variables.
97
+ *
98
+ * The data provided here will override the default data in the generated model
99
+ * for each variable identified by `varId`. Lookup overrides are only effective
100
+ * when the `customLookups` feature is enabled in the bundle.
101
+ *
102
+ * Note that lookup overrides MAY OR MAY NOT persist across `getDatasetsForScenario`
103
+ * calls, depending on the underlying model/runtime implementation. If you want to
104
+ * ensure that previously-applied lookup overrides do not take effect on subsequent
105
+ * runs, pass an undefined `points` array for the relevant variable to cause the
106
+ * lookup data to be reset to its original data.
107
+ */
108
+ lookups?: LookupOverride[];
109
+ }
110
+ export interface DataSource {
111
+ /**
112
+ * Return the datasets that result from running the given scenario.
113
+ *
114
+ * @param scenarioSpec The scenario spec that defines the inputs for the model run.
115
+ * @param datasetKeys The keys of the datasets to be fetched.
116
+ * @param options Optional configuration including constant and lookup overrides.
117
+ */
118
+ getDatasetsForScenario(scenarioSpec: ScenarioSpec, datasetKeys: DatasetKey[], options?: GetDatasetsOptions): Promise<DatasetsResult>;
119
+ }
120
+ //#endregion
121
+ //#region src/bundle/var-types.d.ts
118
122
  /**
119
123
  * Holds information about an item related to a variable used in the model.
120
124
  * For example, this can be used to attach information about a graph that
121
125
  * an output variable is used in, or a slider that controls an input variable.
122
126
  */
123
127
  interface RelatedItem {
124
- id: string;
125
- locationPath: string[];
128
+ id: string;
129
+ locationPath: string[];
126
130
  }
127
131
  /** A unique, stable input identifier. */
128
132
  type InputId = string;
@@ -130,58 +134,58 @@ type InputId = string;
130
134
  * Holds information about an input variable that is controlled by a continuous range/slider.
131
135
  */
132
136
  interface SliderInputVar {
133
- /** Indicates that this input is controlled by a continuous range/slider. */
134
- kind: 'slider';
135
- /**
136
- * A unique, stable identifier string for this input.
137
- *
138
- * This can be used to identify an input variable in a way that is resilient
139
- * to the variable's name being changed between two versions of the model.
140
- *
141
- * For example, if both the "left" and "right" versions of the model have an
142
- * input with an `inputId` of 2, but the variable is called "Variable 2" in
143
- * the left and "Variable Two" in the right, the inputs can be correlated and
144
- * compared despite the different variable names.
145
- */
146
- inputId: InputId;
147
- /** The variable identifier (typically a simplified/canonical ID, like the form used in SDE). */
148
- varId: VarId;
149
- /** The full variable name as used in the modeling tool. */
150
- varName: string;
151
- /** The default value of the input. */
152
- defaultValue: number;
153
- /** The minimum value of the input. */
154
- minValue: number;
155
- /** The maximum value of the input. */
156
- maxValue: number;
157
- /** The metadata for the related input control. */
158
- relatedItem?: RelatedItem;
137
+ /** Indicates that this input is controlled by a continuous range/slider. */
138
+ kind: 'slider';
139
+ /**
140
+ * A unique, stable identifier string for this input.
141
+ *
142
+ * This can be used to identify an input variable in a way that is resilient
143
+ * to the variable's name being changed between two versions of the model.
144
+ *
145
+ * For example, if both the "left" and "right" versions of the model have an
146
+ * input with an `inputId` of 2, but the variable is called "Variable 2" in
147
+ * the left and "Variable Two" in the right, the inputs can be correlated and
148
+ * compared despite the different variable names.
149
+ */
150
+ inputId: InputId;
151
+ /** The variable identifier (typically a simplified/canonical ID, like the form used in SDE). */
152
+ varId: VarId;
153
+ /** The full variable name as used in the modeling tool. */
154
+ varName: string;
155
+ /** The default value of the input. */
156
+ defaultValue: number;
157
+ /** The minimum value of the input. */
158
+ minValue: number;
159
+ /** The maximum value of the input. */
160
+ maxValue: number;
161
+ /** The metadata for the related input control. */
162
+ relatedItem?: RelatedItem;
159
163
  }
160
164
  /**
161
165
  * Holds information about an input variable that is controlled by a discrete on/off switch.
162
166
  */
163
167
  interface SwitchInputVar {
164
- /** Indicates that this input is controlled by a discrete on/off switch. */
165
- kind: 'switch';
166
- /**
167
- * A unique, stable identifier string for this input.
168
- *
169
- * This can be used to identify an input variable in a way that is resilient
170
- * to the variable's name being changed between two versions of the model.
171
- */
172
- inputId: InputId;
173
- /** The variable identifier (typically a simplified/canonical ID, like the form used in SDE). */
174
- varId: VarId;
175
- /** The full variable name as used in the modeling tool. */
176
- varName: string;
177
- /** The default value of the input. */
178
- defaultValue: number;
179
- /** The value of the variable when this switch is in an "off" state. */
180
- offValue: number;
181
- /** The value of the variable when this switch is in an "on" state. */
182
- onValue: number;
183
- /** The metadata for the related input control. */
184
- relatedItem?: RelatedItem;
168
+ /** Indicates that this input is controlled by a discrete on/off switch. */
169
+ kind: 'switch';
170
+ /**
171
+ * A unique, stable identifier string for this input.
172
+ *
173
+ * This can be used to identify an input variable in a way that is resilient
174
+ * to the variable's name being changed between two versions of the model.
175
+ */
176
+ inputId: InputId;
177
+ /** The variable identifier (typically a simplified/canonical ID, like the form used in SDE). */
178
+ varId: VarId;
179
+ /** The full variable name as used in the modeling tool. */
180
+ varName: string;
181
+ /** The default value of the input. */
182
+ defaultValue: number;
183
+ /** The value of the variable when this switch is in an "off" state. */
184
+ offValue: number;
185
+ /** The value of the variable when this switch is in an "on" state. */
186
+ onValue: number;
187
+ /** The metadata for the related input control. */
188
+ relatedItem?: RelatedItem;
185
189
  }
186
190
  /**
187
191
  * Holds information about an input variable used in the model. This is a discriminated
@@ -192,36 +196,37 @@ type InputVar = SliderInputVar | SwitchInputVar;
192
196
  * Holds information about an output variable used in the model.
193
197
  */
194
198
  interface OutputVar {
195
- /** The unique dataset key for this variable (it should include `sourceName` and `varId`). */
196
- datasetKey: DatasetKey;
197
- /**
198
- * The source for the variable (e.g., undefined for a normal model output, "Data" for a variable
199
- * that is defined in an external data file).
200
- */
201
- sourceName?: SourceName;
202
- /** The variable identifier (typically a simplified/canonical ID, like the form used in SDE). */
203
- varId: VarId;
204
- /** The full variable name as used in the modeling tool. */
205
- varName: string;
206
- /** The metadata for the related visuals/graphs in which this variable is used. */
207
- relatedItems?: RelatedItem[];
199
+ /** The unique dataset key for this variable (it should include `sourceName` and `varId`). */
200
+ datasetKey: DatasetKey;
201
+ /**
202
+ * The source for the variable (e.g., undefined for a normal model output, "Data" for a variable
203
+ * that is defined in an external data file).
204
+ */
205
+ sourceName?: SourceName;
206
+ /** The variable identifier (typically a simplified/canonical ID, like the form used in SDE). */
207
+ varId: VarId;
208
+ /** The full variable name as used in the modeling tool. */
209
+ varName: string;
210
+ /** The metadata for the related visuals/graphs in which this variable is used. */
211
+ relatedItems?: RelatedItem[];
208
212
  }
209
213
  /**
210
214
  * Holds information about a variable used in the model implementation.
211
215
  */
212
216
  interface ImplVar {
213
- /** The variable identifier, as used in SDE. */
214
- varId: VarId;
215
- /** The variable name, as used in the modeling tool. */
216
- varName: string;
217
- /** The variable type (e.g. 'level', 'const'). */
218
- varType: string;
219
- /** The variable index, used to reference the value in the generated model. */
220
- varIndex: number;
221
- /** The subscript index values, used to reference the value in the generated model. */
222
- subscriptIndices?: number[];
223
- }
224
-
217
+ /** The variable identifier, as used in SDE. */
218
+ varId: VarId;
219
+ /** The variable name, as used in the modeling tool. */
220
+ varName: string;
221
+ /** The variable type (e.g. 'level', 'const'). */
222
+ varType: string;
223
+ /** The variable index, used to reference the value in the generated model. */
224
+ varIndex: number;
225
+ /** The subscript index values, used to reference the value in the generated model. */
226
+ subscriptIndices?: number[];
227
+ }
228
+ //#endregion
229
+ //#region src/bundle/bundle-types.d.ts
225
230
  /** The human-readable name for a group of inputs. */
226
231
  type InputGroupName = string;
227
232
  /** The alias name for an input. */
@@ -234,40 +239,40 @@ type DatasetGroupName = string;
234
239
  * Describes a group of implementation variables.
235
240
  */
236
241
  interface ImplVarGroup {
237
- /** The group title. */
238
- title: string;
239
- /**
240
- * The function name in the generated model that is associated with
241
- * this group. This can be used when displaying the group to change
242
- * the appearance of the items in the section.
243
- */
244
- fn?: string;
245
- /**
246
- * The keys of the variables in this group (corresponding to the
247
- * `implVars` map keys). It is recommended to provide these in the
248
- * order that the variables are evaluated in the generated model.
249
- */
250
- datasetKeys: DatasetKey[];
242
+ /** The group title. */
243
+ title: string;
244
+ /**
245
+ * The function name in the generated model that is associated with
246
+ * this group. This can be used when displaying the group to change
247
+ * the appearance of the items in the section.
248
+ */
249
+ fn?: string;
250
+ /**
251
+ * The keys of the variables in this group (corresponding to the
252
+ * `implVars` map keys). It is recommended to provide these in the
253
+ * order that the variables are evaluated in the generated model.
254
+ */
255
+ datasetKeys: DatasetKey[];
251
256
  }
252
257
  /**
253
258
  * Includes the properties needed to display a legend item in the UI.
254
259
  */
255
260
  interface LegendItem {
256
- /** The item text. */
257
- label: string;
258
- /** The color of the item (in CSS/hex format). */
259
- color: string;
261
+ /** The item text. */
262
+ label: string;
263
+ /** The color of the item (in CSS/hex format). */
264
+ color: string;
260
265
  }
261
266
  /**
262
267
  * Includes the properties needed to display a link item in the UI.
263
268
  */
264
269
  interface LinkItem {
265
- /** Whether content is a URL or text to be copied to the clipboard. */
266
- kind: 'url' | 'copy';
267
- /** The link text that appears in the UI. */
268
- text: string;
269
- /** The link content (a URL or text). */
270
- content: string;
270
+ /** Whether content is a URL or text to be copied to the clipboard. */
271
+ kind: 'url' | 'copy';
272
+ /** The link text that appears in the UI. */
273
+ text: string;
274
+ /** The link content (a URL or text). */
275
+ content: string;
271
276
  }
272
277
  /** The identifier for a bundle-specific graph. */
273
278
  type BundleGraphId = string;
@@ -275,216 +280,217 @@ type BundleGraphId = string;
275
280
  * Describes a dataset in a bundle-specific graph.
276
281
  */
277
282
  interface BundleGraphDatasetSpec {
278
- /** The dataset key. */
279
- datasetKey: DatasetKey;
280
- /** The dataset or variable name. */
281
- varName: string;
282
- /** The source name. */
283
- sourceName?: string;
284
- /** The label string (as it appears in the graph legend). */
285
- label?: string;
286
- /** The color of the plot (in CSS/hex format). */
287
- color: string;
283
+ /** The dataset key. */
284
+ datasetKey: DatasetKey;
285
+ /** The dataset or variable name. */
286
+ varName: string;
287
+ /** The source name. */
288
+ sourceName?: string;
289
+ /** The label string (as it appears in the graph legend). */
290
+ label?: string;
291
+ /** The color of the plot (in CSS/hex format). */
292
+ color: string;
288
293
  }
289
294
  /**
290
295
  * Describes a bundle-specific graph.
291
296
  */
292
297
  interface BundleGraphSpec {
293
- /** The graph identifier. */
294
- id: BundleGraphId;
295
- /** The graph title. */
296
- title: string;
297
- /** The legend items for the graph. */
298
- legendItems: LegendItem[];
299
- /** The datasets displayed in this graph. */
300
- datasets: BundleGraphDatasetSpec[];
301
- /** Metadata for the graph that can be used to diff to another graph. */
302
- metadata: Map<string, string>;
298
+ /** The graph identifier. */
299
+ id: BundleGraphId;
300
+ /** The graph title. */
301
+ title: string;
302
+ /** The legend items for the graph. */
303
+ legendItems: LegendItem[];
304
+ /** The datasets displayed in this graph. */
305
+ datasets: BundleGraphDatasetSpec[];
306
+ /** Metadata for the graph that can be used to diff to another graph. */
307
+ metadata: Map<string, string>;
303
308
  }
304
309
  /**
305
310
  * Options for configuring a bundle-specific graph view.
306
311
  */
307
312
  interface BundleGraphViewOptions {
308
- /** Whether graph updates will be animated (default is false). */
309
- animated?: boolean;
310
- /** A hint that indicates the context in which the graph will be displayed. */
311
- style?: 'thumbnail' | undefined;
313
+ /** Whether graph updates will be animated (default is false). */
314
+ animated?: boolean;
315
+ /** A hint that indicates the context in which the graph will be displayed. */
316
+ style?: 'thumbnail' | undefined;
312
317
  }
313
318
  /**
314
319
  * Allows for displaying a bundle-specific graph.
315
320
  */
316
321
  interface BundleGraphView {
317
- /**
318
- * Update the data that is displayed in the graph.
319
- *
320
- * @hidden This method is optional; it is not currently used by the report UI, but may be useful
321
- * for other tools that want to display bundle-specific graphs.
322
- *
323
- * @param datasetMap The map of datasets that contain the data to be displayed in the graph.
324
- */
325
- updateData?(datasetMap: DatasetMap): void;
326
- /** Destroy the underlying graph view and any associated resources. */
327
- destroy(): void;
322
+ /**
323
+ * Update the data that is displayed in the graph.
324
+ *
325
+ * @hidden This method is optional; it is not currently used by the report UI, but may be useful
326
+ * for other tools that want to display bundle-specific graphs.
327
+ *
328
+ * @param datasetMap The map of datasets that contain the data to be displayed in the graph.
329
+ */
330
+ updateData?(datasetMap: DatasetMap): void;
331
+ /** Destroy the underlying graph view and any associated resources. */
332
+ destroy(): void;
328
333
  }
329
334
  /**
330
335
  * Wrapper around data that can be used to initialize a graph view.
331
336
  */
332
337
  interface BundleGraphData {
333
- /**
334
- * Return a graph view that can be attached to the given parent element. The returned
335
- * `BundleGraphView` instance will already be configured to display the data that was
336
- * fetched from the model for the associated scenario.
337
- *
338
- * @param parent The parent element to which the graph view will be attached.
339
- * @returns A `BundleGraphView` instance.
340
- */
341
- createGraphView(parent: HTMLElement): BundleGraphView;
338
+ /**
339
+ * Return a graph view that can be attached to the given parent element. The returned
340
+ * `BundleGraphView` instance will already be configured to display the data that was
341
+ * fetched from the model for the associated scenario.
342
+ *
343
+ * @param parent The parent element to which the graph view will be attached.
344
+ * @returns A `BundleGraphView` instance.
345
+ */
346
+ createGraphView(parent: HTMLElement): BundleGraphView;
342
347
  }
343
348
  /**
344
349
  * Describes the model that is contained in this bundle.
345
350
  */
346
351
  interface ModelSpec {
347
- /** The size of the model binary, in bytes. */
348
- modelSizeInBytes: number;
349
- /** The size of the static data, in bytes. */
350
- dataSizeInBytes: number;
351
- /** The map of all input variables in this version of the model. */
352
- inputVars: Map<VarId, InputVar>;
353
- /** The map of all output (and static data) variables in this version of the model. */
354
- outputVars: Map<DatasetKey, OutputVar>;
355
- /** The map of all variables (both internal and exported) in this version of the model. */
356
- implVars: Map<DatasetKey, ImplVar>;
357
- /** The groupings of internal/implementation variables in this version of the model. */
358
- implVarGroups?: ImplVarGroup[];
359
- /** The custom input variable aliases defined for this model. */
360
- inputAliases?: Map<InputAliasName, VarId>;
361
- /** The custom input variable groups defined for this model. */
362
- inputGroups?: Map<InputGroupName, InputVar[]>;
363
- /** The custom input setting groups defined for this model. */
364
- inputSettingGroups?: Map<InputSettingGroupId, InputSetting[]>;
365
- /** The custom dataset (output variable) groups defined for this model. */
366
- datasetGroups?: Map<DatasetGroupName, DatasetKey[]>;
367
- /** The start time (year) for the model. */
368
- startTime?: number;
369
- /** The end time (year) for the model. */
370
- endTime?: number;
371
- /** The specs for the bundled graphs. */
372
- graphSpecs?: BundleGraphSpec[];
352
+ /** The size of the model binary, in bytes. */
353
+ modelSizeInBytes: number;
354
+ /** The size of the static data, in bytes. */
355
+ dataSizeInBytes: number;
356
+ /** The map of all input variables in this version of the model. */
357
+ inputVars: Map<VarId, InputVar>;
358
+ /** The map of all output (and static data) variables in this version of the model. */
359
+ outputVars: Map<DatasetKey, OutputVar>;
360
+ /** The map of all variables (both internal and exported) in this version of the model. */
361
+ implVars: Map<DatasetKey, ImplVar>;
362
+ /** The groupings of internal/implementation variables in this version of the model. */
363
+ implVarGroups?: ImplVarGroup[];
364
+ /** The custom input variable aliases defined for this model. */
365
+ inputAliases?: Map<InputAliasName, VarId>;
366
+ /** The custom input variable groups defined for this model. */
367
+ inputGroups?: Map<InputGroupName, InputVar[]>;
368
+ /** The custom input setting groups defined for this model. */
369
+ inputSettingGroups?: Map<InputSettingGroupId, InputSetting[]>;
370
+ /** The custom dataset (output variable) groups defined for this model. */
371
+ datasetGroups?: Map<DatasetGroupName, DatasetKey[]>;
372
+ /** The start time (year) for the model. */
373
+ startTime?: number;
374
+ /** The end time (year) for the model. */
375
+ endTime?: number;
376
+ /** The specs for the bundled graphs. */
377
+ graphSpecs?: BundleGraphSpec[];
373
378
  }
374
379
  /**
375
380
  * An interface that allows for running the bundled model under different input scenarios
376
381
  * and capturing the resulting output data.
377
382
  */
378
383
  interface BundleModel extends DataSource {
379
- /** The spec for the bundled model. */
380
- modelSpec: ModelSpec;
381
- /**
382
- * Load the data used to display the graph by running the model with inputs
383
- * configured for the given scenario.
384
- *
385
- * The returned `BundleGraphData` instance will contain the data associated with the
386
- * given graph. Calling the `createGraphView` method on the `BundleGraphData` instance
387
- * will create a `BundleGraphView` that is already configured to display the data
388
- * associated with the graph.
389
- *
390
- * This method is optional; if not implemented, custom graphs will not be displayed in
391
- * the report UI.
392
- *
393
- * @param scenarioSpec The scenario spec that defines the inputs for the model run.
394
- * @param graphId The identifier of the graph for which data will be loaded.
395
- * @returns The graph data.
396
- */
397
- getGraphDataForScenario?(scenarioSpec: ScenarioSpec, graphId: BundleGraphId): Promise<BundleGraphData>;
398
- /**
399
- * Return the links to be displayed for the graph in the given scenario.
400
- *
401
- * This method is optional; if not implemented, no graph links will be displayed in the report UI.
402
- *
403
- * @param scenarioSpec The scenario spec that defines the inputs for the model run.
404
- * @param graphId The identifier of the graph for which links will be prepared.
405
- * @returns An array of `LinkItem` instances.
406
- */
407
- getGraphLinksForScenario?(scenarioSpec: ScenarioSpec, graphId: BundleGraphId): LinkItem[];
408
- /**
409
- * Return a graph view that is attached to the given element and that is prepared to display data
410
- * for the given graph.
411
- *
412
- * Unlike `getGraphDataForScenario`, this method only creates the graph view. The data for the
413
- * graph must be provided separately by calling the `updateData` method on the `BundleGraphView`
414
- * instance.
415
- *
416
- * @hidden This method is optional; it is not currently used by the report UI, but may be useful
417
- * for other tools that want to display bundle-specific graphs.
418
- *
419
- * @param parent The parent element to which the graph view will be attached.
420
- * @param graphId The identifier of the graph for which the graph view will be prepared.
421
- * @param options Optional configuration for the graph view.
422
- * @returns A `BundleGraphView` instance.
423
- */
424
- createGraphView?(parent: HTMLElement, graphId: BundleGraphId, options?: BundleGraphViewOptions): BundleGraphView;
384
+ /** The spec for the bundled model. */
385
+ modelSpec: ModelSpec;
386
+ /**
387
+ * Load the data used to display the graph by running the model with inputs
388
+ * configured for the given scenario.
389
+ *
390
+ * The returned `BundleGraphData` instance will contain the data associated with the
391
+ * given graph. Calling the `createGraphView` method on the `BundleGraphData` instance
392
+ * will create a `BundleGraphView` that is already configured to display the data
393
+ * associated with the graph.
394
+ *
395
+ * This method is optional; if not implemented, custom graphs will not be displayed in
396
+ * the report UI.
397
+ *
398
+ * @param scenarioSpec The scenario spec that defines the inputs for the model run.
399
+ * @param graphId The identifier of the graph for which data will be loaded.
400
+ * @returns The graph data.
401
+ */
402
+ getGraphDataForScenario?(scenarioSpec: ScenarioSpec, graphId: BundleGraphId): Promise<BundleGraphData>;
403
+ /**
404
+ * Return the links to be displayed for the graph in the given scenario.
405
+ *
406
+ * This method is optional; if not implemented, no graph links will be displayed in the report UI.
407
+ *
408
+ * @param scenarioSpec The scenario spec that defines the inputs for the model run.
409
+ * @param graphId The identifier of the graph for which links will be prepared.
410
+ * @returns An array of `LinkItem` instances.
411
+ */
412
+ getGraphLinksForScenario?(scenarioSpec: ScenarioSpec, graphId: BundleGraphId): LinkItem[];
413
+ /**
414
+ * Return a graph view that is attached to the given element and that is prepared to display data
415
+ * for the given graph.
416
+ *
417
+ * Unlike `getGraphDataForScenario`, this method only creates the graph view. The data for the
418
+ * graph must be provided separately by calling the `updateData` method on the `BundleGraphView`
419
+ * instance.
420
+ *
421
+ * @hidden This method is optional; it is not currently used by the report UI, but may be useful
422
+ * for other tools that want to display bundle-specific graphs.
423
+ *
424
+ * @param parent The parent element to which the graph view will be attached.
425
+ * @param graphId The identifier of the graph for which the graph view will be prepared.
426
+ * @param options Optional configuration for the graph view.
427
+ * @returns A `BundleGraphView` instance.
428
+ */
429
+ createGraphView?(parent: HTMLElement, graphId: BundleGraphId, options?: BundleGraphViewOptions): BundleGraphView;
425
430
  }
426
431
  /**
427
432
  * Provides access to the model that is contained in this bundle for use in
428
433
  * model-check packages.
429
434
  */
430
435
  interface Bundle {
431
- /**
432
- * The version of the bundle. This should be incremented when there is an
433
- * incompatible change to the bundle format. The model-check tools can use
434
- * this value to skip tests if two bundles have different version numbers.
435
- */
436
- version: number;
437
- /** The spec for the bundled model. */
438
- modelSpec: ModelSpec;
439
- /** Asynchronously initialize the underlying model. */
440
- initModel(): Promise<BundleModel>;
436
+ /**
437
+ * The version of the bundle. This should be incremented when there is an
438
+ * incompatible change to the bundle format. The model-check tools can use
439
+ * this value to skip tests if two bundles have different version numbers.
440
+ */
441
+ version: number;
442
+ /** The spec for the bundled model. */
443
+ modelSpec: ModelSpec;
444
+ /** Asynchronously initialize the underlying model. */
445
+ initModel(): Promise<BundleModel>;
441
446
  }
442
447
  /**
443
448
  * Associates a name with a `Bundle`.
444
449
  */
445
450
  interface NamedBundle {
446
- /** The name of the bundle, for example, "Current" or "Baseline". */
447
- name: string;
448
- /** The associated bundle. */
449
- bundle: Bundle;
451
+ /** The name of the bundle, for example, "Current" or "Baseline". */
452
+ name: string;
453
+ /** The associated bundle. */
454
+ bundle: Bundle;
450
455
  }
451
456
  /**
452
457
  * Represents a bundle that has had its model instances initialized.
453
458
  */
454
459
  interface LoadedBundle {
455
- /** The name of the bundle, for example, "Current" or "Baseline". */
456
- name: string;
457
- /** The version of the bundle. */
458
- version: number;
459
- /** The spec for the bundled model. */
460
- modelSpec: ModelSpec;
461
- /**
462
- * The initialized model instances for this bundle. If `concurrency` was specified
463
- * in the config, then there will be that number of model instances in this array,
464
- * otherwise there will be one instance.
465
- */
466
- models: BundleModel[];
467
- }
468
-
460
+ /** The name of the bundle, for example, "Current" or "Baseline". */
461
+ name: string;
462
+ /** The version of the bundle. */
463
+ version: number;
464
+ /** The spec for the bundled model. */
465
+ modelSpec: ModelSpec;
466
+ /**
467
+ * The initialized model instances for this bundle. If `concurrency` was specified
468
+ * in the config, then there will be that number of model instances in this array,
469
+ * otherwise there will be one instance.
470
+ */
471
+ models: BundleModel[];
472
+ }
473
+ //#endregion
474
+ //#region src/bundle/impl-vars-codec.d.ts
469
475
  /**
470
476
  * A terse representation of a subscript.
471
477
  */
472
478
  interface EncodedSubscript {
473
- /** The subscript name (e.g., "Sub1"). */
474
- n: string;
475
- /** The subscript identifier (e.g., "_sub1"). */
476
- i: string;
479
+ /** The subscript name (e.g., "Sub1"). */
480
+ n: string;
481
+ /** The subscript identifier (e.g., "_sub1"). */
482
+ i: string;
477
483
  }
478
484
  /**
479
485
  * A terse representation of a variable without subscripts.
480
486
  */
481
487
  interface EncodedVariable {
482
- /** The variable name (corresponds to the base part of `ImplVar.varName` without subscripts). */
483
- n: string;
484
- /** The variable identifier (corresponds to the base part of `ImplVar.varId` without subscripts). */
485
- i: string;
486
- /** The variable index (corresponds to `ImplVar.varIndex`). */
487
- x: number;
488
+ /** The variable name (corresponds to the base part of `ImplVar.varName` without subscripts). */
489
+ n: string;
490
+ /** The variable identifier (corresponds to the base part of `ImplVar.varId` without subscripts). */
491
+ i: string;
492
+ /** The variable index (corresponds to `ImplVar.varIndex`). */
493
+ x: number;
488
494
  }
489
495
  /**
490
496
  * A terse representation of a variable type.
@@ -505,12 +511,12 @@ type EncodedVarInstance = number[];
505
511
  * The encoded representation of impl variables that eliminates redundancy.
506
512
  */
507
513
  interface EncodedImplVars {
508
- subscripts: EncodedSubscript[];
509
- variables: EncodedVariable[];
510
- varTypes: EncodedVarType[];
511
- varInstances: {
512
- [key: string]: EncodedVarInstance[];
513
- };
514
+ subscripts: EncodedSubscript[];
515
+ variables: EncodedVariable[];
516
+ varTypes: EncodedVarType[];
517
+ varInstances: {
518
+ [key: string]: EncodedVarInstance[];
519
+ };
514
520
  }
515
521
  /**
516
522
  * Encode impl variable metadata into a more efficient format.
@@ -524,8 +530,8 @@ interface EncodedImplVars {
524
530
  * @param input The input structure mapping keys to ImplVar arrays.
525
531
  * @returns The encoded representation.
526
532
  */
527
- declare function encodeImplVars(input: {
528
- [key: string]: ImplVar[];
533
+ export declare function encodeImplVars(input: {
534
+ [key: string]: ImplVar[];
529
535
  }): EncodedImplVars;
530
536
  /**
531
537
  * Decode impl variables from the efficient format back to the original structure.
@@ -533,50 +539,52 @@ declare function encodeImplVars(input: {
533
539
  * @param encoded The encoded representation.
534
540
  * @returns The original structure mapping keys to `ImplVar` arrays.
535
541
  */
536
- declare function decodeImplVars(encoded: EncodedImplVars): {
537
- [key: string]: ImplVar[];
542
+ export declare function decodeImplVars(encoded: EncodedImplVars): {
543
+ [key: string]: ImplVar[];
538
544
  };
539
-
545
+ //#endregion
546
+ //#region src/check/check-config.d.ts
540
547
  interface CheckOptions {
541
- /** The strings containing check tests in YAML format. */
542
- tests: string[];
548
+ /** The strings containing check tests in YAML format. */
549
+ tests: string[];
543
550
  }
544
551
  interface CheckConfig {
545
- /** The loaded bundle being checked. */
546
- bundle: LoadedBundle;
547
- /** The strings containing check tests in YAML format. */
548
- tests: string[];
552
+ /** The loaded bundle being checked. */
553
+ bundle: LoadedBundle;
554
+ /** The strings containing check tests in YAML format. */
555
+ tests: string[];
549
556
  }
550
-
557
+ //#endregion
558
+ //#region src/_shared/task-queue.d.ts
551
559
  type TaskKey = string;
552
560
  type TaskExecutorKey = string;
553
561
  interface BundleModels {
554
- L?: BundleModel;
555
- R: BundleModel;
562
+ L?: BundleModel;
563
+ R: BundleModel;
556
564
  }
557
565
  /**
558
566
  * Base interface for all tasks in the unified system.
559
567
  */
560
568
  interface Task {
561
- /** Unique key for this task instance. */
562
- key: TaskKey;
563
- /** The task kind. */
564
- kind: string;
565
- /** Process the task using the given models. */
566
- process(models: BundleModels): Promise<void>;
569
+ /** Unique key for this task instance. */
570
+ key: TaskKey;
571
+ /** The task kind. */
572
+ kind: string;
573
+ /** Process the task using the given models. */
574
+ process(models: BundleModels): Promise<void>;
567
575
  }
568
576
  /**
569
577
  * Executes a single task using a set of `BundleModel` instances.
570
578
  */
571
579
  interface TaskExecutor {
572
- /**
573
- * Execute the given task using the set of `BundleModel` instances
574
- * associated with this executor.
575
- *
576
- * @param task The task to execute.
577
- * @return A promise that resolves when the task is complete.
578
- */
579
- execute(task: Task): Promise<void>;
580
+ /**
581
+ * Execute the given task using the set of `BundleModel` instances
582
+ * associated with this executor.
583
+ *
584
+ * @param task The task to execute.
585
+ * @return A promise that resolves when the task is complete.
586
+ */
587
+ execute(task: Task): Promise<void>;
580
588
  }
581
589
  /**
582
590
  * A unified task queue that can process multiple kinds of tasks concurrently
@@ -584,162 +592,167 @@ interface TaskExecutor {
584
592
  * This replaces the need for multiple separate TaskQueue instances.
585
593
  */
586
594
  declare class TaskQueue {
587
- private readonly executors;
588
- /** The single instance. */
589
- private static instance;
590
- /** The queue of task keys, most recent at front. */
591
- private readonly taskKeyQueue;
592
- /** The map of tasks. */
593
- private readonly taskMap;
594
- /** The idle event listeners. */
595
- private readonly idleListeners;
596
- /** Whether tasks are being processed. */
597
- private processing;
598
- /** Whether `shutdown` has been called. */
599
- private stopped;
600
- /**
601
- * @param executors The map of available task executors.
602
- */
603
- constructor(executors: Map<TaskExecutorKey, TaskExecutor>);
604
- /**
605
- * Initialize the shared `TaskQueue` instance.
606
- *
607
- * @param executors The map of available task executors.
608
- */
609
- static initialize(executors: Map<TaskExecutorKey, TaskExecutor>): void;
610
- /**
611
- * Get the shared `TaskQueue` instance.
612
- */
613
- static getInstance(): TaskQueue;
614
- /**
615
- * Add a task to the queue.
616
- *
617
- * @param task The task to add.
618
- */
619
- addTask(task: Task): void;
620
- /**
621
- * Cancel a task.
622
- *
623
- * @param taskKey The key of the task to cancel.
624
- */
625
- cancelTask(taskKey: TaskKey): void;
626
- /**
627
- * Add an idle listener.
628
- *
629
- * @param listener The listener to add.
630
- */
631
- onIdle(listener: (error?: Error) => void): void;
632
- /**
633
- * Remove an idle listener.
634
- *
635
- * @param listener The listener to remove.
636
- */
637
- removeIdleListener(listener: (error?: Error) => void): void;
638
- /**
639
- * Notify the idle listeners.
640
- *
641
- * @param error The error to notify the listeners with.
642
- */
643
- private notifyIdle;
644
- /**
645
- * Shutdown the task queue, cancelling all pending tasks.
646
- */
647
- shutdown(): void;
648
- private processTasksIfNeeded;
649
- private processNextTasks;
650
- }
651
-
595
+ private readonly executors;
596
+ /** The single instance. */
597
+ private static instance;
598
+ /** The queue of task keys, most recent at front. */
599
+ private readonly taskKeyQueue;
600
+ /** The map of tasks. */
601
+ private readonly taskMap;
602
+ /** The idle event listeners. */
603
+ private readonly idleListeners;
604
+ /** Whether tasks are being processed. */
605
+ private processing;
606
+ /** Whether `shutdown` has been called. */
607
+ private stopped;
608
+ /**
609
+ * @param executors The map of available task executors.
610
+ */
611
+ constructor(executors: Map<TaskExecutorKey, TaskExecutor>);
612
+ /**
613
+ * Initialize the shared `TaskQueue` instance.
614
+ *
615
+ * @param executors The map of available task executors.
616
+ */
617
+ static initialize(executors: Map<TaskExecutorKey, TaskExecutor>): void;
618
+ /**
619
+ * Get the shared `TaskQueue` instance.
620
+ */
621
+ static getInstance(): TaskQueue;
622
+ /**
623
+ * Add a task to the queue.
624
+ *
625
+ * @param task The task to add.
626
+ */
627
+ addTask(task: Task): void;
628
+ /**
629
+ * Cancel a task.
630
+ *
631
+ * @param taskKey The key of the task to cancel.
632
+ */
633
+ cancelTask(taskKey: TaskKey): void;
634
+ /**
635
+ * Add an idle listener.
636
+ *
637
+ * @param listener The listener to add.
638
+ */
639
+ onIdle(listener: (error?: Error) => void): void;
640
+ /**
641
+ * Remove an idle listener.
642
+ *
643
+ * @param listener The listener to remove.
644
+ */
645
+ removeIdleListener(listener: (error?: Error) => void): void;
646
+ /**
647
+ * Notify the idle listeners.
648
+ *
649
+ * @param error The error to notify the listeners with.
650
+ */
651
+ private notifyIdle;
652
+ /**
653
+ * Shutdown the task queue, cancelling all pending tasks.
654
+ */
655
+ shutdown(): void;
656
+ private processTasksIfNeeded;
657
+ private processNextTasks;
658
+ }
659
+ //#endregion
660
+ //#region src/check/check-data-coordinator.d.ts
652
661
  type CheckDataRequestKey = string;
653
662
  /**
654
663
  * Options for `requestDataset`.
655
664
  */
656
665
  interface RequestDatasetOptions {
657
- /** Optional constant overrides for the model. */
658
- constants?: ConstantOverride[];
659
- /** Optional lookup overrides for the model. */
660
- lookups?: LookupOverride[];
666
+ /** Optional constant overrides for the model. */
667
+ constants?: ConstantOverride[];
668
+ /** Optional lookup overrides for the model. */
669
+ lookups?: LookupOverride[];
661
670
  }
662
671
  /**
663
672
  * Coordinates on-demand loading of data used to display a graph representation
664
673
  * of a check/predicate.
665
674
  */
666
- declare class CheckDataCoordinator {
667
- private readonly taskQueue;
668
- constructor(taskQueue: TaskQueue);
669
- /**
670
- * Request a dataset from the model.
671
- *
672
- * @param requestKey The unique key for the request.
673
- * @param scenarioSpec The scenario spec that defines the inputs for the model run.
674
- * @param datasetKey The key of the dataset to be fetched.
675
- * @param options Optional configuration including constant and lookup overrides.
676
- * @param onResponse The callback that will be called with the dataset.
677
- */
678
- requestDataset(requestKey: CheckDataRequestKey, scenarioSpec: ScenarioSpec, datasetKey: DatasetKey, options: RequestDatasetOptions | undefined, onResponse: (dataset: Dataset) => void): void;
679
- cancelRequest(key: CheckDataRequestKey): void;
675
+ export declare class CheckDataCoordinator {
676
+ private readonly taskQueue;
677
+ constructor(taskQueue: TaskQueue);
678
+ /**
679
+ * Request a dataset from the model.
680
+ *
681
+ * @param requestKey The unique key for the request.
682
+ * @param scenarioSpec The scenario spec that defines the inputs for the model run.
683
+ * @param datasetKey The key of the dataset to be fetched.
684
+ * @param options Optional configuration including constant and lookup overrides.
685
+ * @param onResponse The callback that will be called with the dataset.
686
+ */
687
+ requestDataset(requestKey: CheckDataRequestKey, scenarioSpec: ScenarioSpec, datasetKey: DatasetKey, options: RequestDatasetOptions | undefined, onResponse: (dataset: Dataset) => void): void;
688
+ cancelRequest(key: CheckDataRequestKey): void;
680
689
  }
681
690
  /**
682
691
  * Create a `CheckDataCoordinator` instance using the shared task queue.
683
692
  */
684
- declare function createCheckDataCoordinator(): CheckDataCoordinator;
693
+ export declare function createCheckDataCoordinator(): CheckDataCoordinator;
685
694
  /**
686
695
  * @hidden This is not part of the public API; it is exposed only for use in tests.
687
696
  */
688
- declare function createCheckDataCoordinatorForTests(bundleModel: BundleModel): CheckDataCoordinator;
689
-
697
+ export declare function createCheckDataCoordinatorForTests(bundleModel: BundleModel): CheckDataCoordinator;
698
+ //#endregion
699
+ //#region src/check/check-spec.d.ts
690
700
  /** Spec type that allows for matching a check by group and test name. */
691
701
  interface CheckNameSpec {
692
- /** The name of a check group. */
693
- groupName: string;
694
- /** The name of a check test. */
695
- testName: string;
702
+ /** The name of a check group. */
703
+ groupName: string;
704
+ /** The name of a check test. */
705
+ testName: string;
696
706
  }
697
707
  type CheckPredicateTimeSingle = number;
698
708
  type CheckPredicateTimeRange = [number, number];
699
709
  interface CheckPredicateTimeOptions {
700
- after_excl?: number;
701
- after_incl?: number;
702
- before_excl?: number;
703
- before_incl?: number;
710
+ after_excl?: number;
711
+ after_incl?: number;
712
+ before_excl?: number;
713
+ before_incl?: number;
704
714
  }
705
715
  type CheckPredicateTimeSpec = CheckPredicateTimeSingle | CheckPredicateTimeRange | CheckPredicateTimeOptions;
706
-
716
+ //#endregion
717
+ //#region src/check/check-dataset.d.ts
707
718
  type CheckDatasetError = 'no-matches-for-dataset' | 'no-matches-for-group' | 'no-matches-for-type';
708
719
  interface CheckDataset {
709
- /** The key for the matched dataset; can be undefined if no dataset matched. */
710
- datasetKey?: DatasetKey;
711
- /** The name of the matched dataset, or the name associated with the error, if defined. */
712
- name: string;
713
- /** The error info if the dataset query failed to match. */
714
- error?: CheckDatasetError;
715
- }
716
-
720
+ /** The key for the matched dataset; can be undefined if no dataset matched. */
721
+ datasetKey?: DatasetKey;
722
+ /** The name of the matched dataset, or the name associated with the error, if defined. */
723
+ name: string;
724
+ /** The error info if the dataset query failed to match. */
725
+ error?: CheckDatasetError;
726
+ }
727
+ //#endregion
728
+ //#region src/check/check-scenario.d.ts
717
729
  interface CheckScenarioError {
718
- kind: 'unknown-input-group' | 'empty-input-group';
719
- /** The name of the input group that failed to match. */
720
- name: string;
730
+ kind: 'unknown-input-group' | 'empty-input-group';
731
+ /** The name of the input group that failed to match. */
732
+ name: string;
721
733
  }
722
734
  interface CheckScenarioInputDesc {
723
- /** The name of the input. */
724
- name: string;
725
- /** The matched input variable; can be undefined if no input matched. */
726
- inputVar?: InputVar;
727
- /** The position of the input, if this is a position scenario. */
728
- position?: InputPosition;
729
- /** The value of the input, for the given position or explicit value. */
730
- value?: number;
735
+ /** The name of the input. */
736
+ name: string;
737
+ /** The matched input variable; can be undefined if no input matched. */
738
+ inputVar?: InputVar;
739
+ /** The position of the input, if this is a position scenario. */
740
+ position?: InputPosition;
741
+ /** The value of the input, for the given position or explicit value. */
742
+ value?: number;
731
743
  }
732
744
  interface CheckScenario {
733
- /** The spec used to configure the model with the matched input(s); can be undefined if input(s) failed to match. */
734
- spec?: ScenarioSpec;
735
- /** The name of the associated input group, if any. */
736
- inputGroupName?: string;
737
- /** The descriptions of the inputs; if empty, it is an "all inputs" scenario. */
738
- inputDescs: CheckScenarioInputDesc[];
739
- /** The error info if the scenario/input query failed to match. */
740
- error?: CheckScenarioError;
741
- }
742
-
745
+ /** The spec used to configure the model with the matched input(s); can be undefined if input(s) failed to match. */
746
+ spec?: ScenarioSpec;
747
+ /** The name of the associated input group, if any. */
748
+ inputGroupName?: string;
749
+ /** The descriptions of the inputs; if empty, it is an "all inputs" scenario. */
750
+ inputDescs: CheckScenarioInputDesc[];
751
+ /** The error info if the scenario/input query failed to match. */
752
+ error?: CheckScenarioError;
753
+ }
754
+ //#endregion
755
+ //#region src/check/check-data-ref.d.ts
743
756
  /**
744
757
  * The key type for data references (in the form `<ScenarioUid::DatasetKey>`).
745
758
  */
@@ -753,12 +766,12 @@ type CheckDataRefOp = 'sum';
753
766
  * by a predicate. Each of these corresponds to one data fetch.
754
767
  */
755
768
  interface CheckRefDataset {
756
- /** The key for the reference; can be undefined if inputs or datasets failed to match. */
757
- key?: CheckDataRefKey;
758
- /** The scenario used to generate the referenced dataset. */
759
- scenario: CheckScenario;
760
- /** The referenced dataset. */
761
- dataset: CheckDataset;
769
+ /** The key for the reference; can be undefined if inputs or datasets failed to match. */
770
+ key?: CheckDataRefKey;
771
+ /** The scenario used to generate the referenced dataset. */
772
+ scenario: CheckScenario;
773
+ /** The referenced dataset. */
774
+ dataset: CheckDataset;
762
775
  }
763
776
  /**
764
777
  * The dataset(s) referenced by a particular predicate op (for cases where the check
@@ -766,69 +779,73 @@ interface CheckRefDataset {
766
779
  * is referenced, the `op` determines how they are combined into a single dataset.
767
780
  */
768
781
  interface CheckDataRef {
769
- /** The operation used to combine the referenced datasets; undefined if there is a single dataset. */
770
- op?: CheckDataRefOp;
771
- /** The referenced datasets. */
772
- refs: CheckRefDataset[];
782
+ /** The operation used to combine the referenced datasets; undefined if there is a single dataset. */
783
+ op?: CheckDataRefOp;
784
+ /** The referenced datasets. */
785
+ refs: CheckRefDataset[];
773
786
  }
774
-
787
+ //#endregion
788
+ //#region src/check/check-predicate.d.ts
775
789
  type CheckPredicateOp = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'approx';
776
-
790
+ //#endregion
791
+ //#region src/check/check-func.d.ts
777
792
  interface CheckResultErrorInfo {
778
- kind: 'unknown-dataset' | 'unknown-input' | 'unknown-input-group' | 'empty-input-group';
779
- name: string;
793
+ kind: 'unknown-dataset' | 'unknown-input' | 'unknown-input-group' | 'empty-input-group';
794
+ name: string;
780
795
  }
781
796
  interface CheckResult {
782
- status: 'passed' | 'failed' | 'error' | 'skipped';
783
- message?: string;
784
- failValue?: number;
785
- failOp?: CheckPredicateOp;
786
- failRefValue?: number;
787
- failTime?: number;
788
- errorInfo?: CheckResultErrorInfo;
789
- }
790
-
797
+ status: 'passed' | 'failed' | 'error' | 'skipped';
798
+ message?: string;
799
+ failValue?: number;
800
+ failOp?: CheckPredicateOp;
801
+ failRefValue?: number;
802
+ failTime?: number;
803
+ errorInfo?: CheckResultErrorInfo;
804
+ }
805
+ //#endregion
806
+ //#region src/check/check-planner.d.ts
791
807
  type CheckKey = number;
792
-
808
+ //#endregion
809
+ //#region src/check/check-report.d.ts
793
810
  type CheckStatus = 'passed' | 'failed' | 'error' | 'skipped';
794
811
  interface CheckPredicateOpConstantRef {
795
- kind: 'constant';
796
- value: number;
812
+ kind: 'constant';
813
+ value: number;
797
814
  }
798
815
  interface CheckPredicateOpDataRef {
799
- kind: 'data';
800
- dataRef: CheckDataRef;
816
+ kind: 'data';
817
+ dataRef: CheckDataRef;
801
818
  }
802
819
  type CheckPredicateOpRef = CheckPredicateOpConstantRef | CheckPredicateOpDataRef;
803
820
  interface CheckPredicateReport {
804
- checkKey: CheckKey;
805
- result: CheckResult;
806
- opRefs: Map<CheckPredicateOp, CheckPredicateOpRef>;
807
- opValues: string[];
808
- time?: CheckPredicateTimeSpec;
809
- tolerance?: number;
821
+ checkKey: CheckKey;
822
+ result: CheckResult;
823
+ opRefs: Map<CheckPredicateOp, CheckPredicateOpRef>;
824
+ opValues: string[];
825
+ time?: CheckPredicateTimeSpec;
826
+ tolerance?: number;
810
827
  }
811
828
  interface CheckDatasetReport {
812
- checkDataset: CheckDataset;
813
- status: CheckStatus;
814
- predicates: CheckPredicateReport[];
829
+ checkDataset: CheckDataset;
830
+ status: CheckStatus;
831
+ predicates: CheckPredicateReport[];
815
832
  }
816
833
  interface CheckScenarioReport {
817
- checkScenario: CheckScenario;
818
- status: CheckStatus;
819
- datasets: CheckDatasetReport[];
834
+ checkScenario: CheckScenario;
835
+ status: CheckStatus;
836
+ datasets: CheckDatasetReport[];
820
837
  }
821
838
  interface CheckTestReport {
822
- name: string;
823
- status: CheckStatus;
824
- scenarios: CheckScenarioReport[];
839
+ name: string;
840
+ status: CheckStatus;
841
+ scenarios: CheckScenarioReport[];
825
842
  }
826
843
  interface CheckGroupReport {
827
- name: string;
828
- tests: CheckTestReport[];
844
+ name: string;
845
+ tests: CheckTestReport[];
829
846
  }
830
847
  interface CheckReport {
831
- groups: CheckGroupReport[];
848
+ groups: CheckGroupReport[];
832
849
  }
833
850
  type StyleFunc = (s: string) => string;
834
851
  /**
@@ -837,29 +854,30 @@ type StyleFunc = (s: string) => string;
837
854
  * @param scenario The scenario report.
838
855
  * @param bold A function that applies bold styling to a string.
839
856
  */
840
- declare function scenarioMessage(scenario: CheckScenarioReport, bold: StyleFunc): string;
857
+ export declare function scenarioMessage(scenario: CheckScenarioReport, bold: StyleFunc): string;
841
858
  /**
842
859
  * Return a string representation of the given dataset.
843
860
  *
844
861
  * @param dataset The dataset report.
845
862
  * @param bold A function that applies bold styling to a string.
846
863
  */
847
- declare function datasetMessage(dataset: CheckDatasetReport, bold: StyleFunc): string;
864
+ export declare function datasetMessage(dataset: CheckDatasetReport, bold: StyleFunc): string;
848
865
  /**
849
866
  * Return a string representation of the given predicate.
850
867
  *
851
868
  * @param predicate The predicate report.
852
869
  * @param bold A function that applies bold styling to a string.
853
870
  */
854
- declare function predicateMessage(predicate: CheckPredicateReport, bold: StyleFunc): string;
855
-
871
+ export declare function predicateMessage(predicate: CheckPredicateReport, bold: StyleFunc): string;
872
+ //#endregion
873
+ //#region src/check/check-summary.d.ts
856
874
  /**
857
875
  * A simplified/terse version of `CheckPredicateReport` that matches the
858
876
  * format of the JSON objects emitted by the CLI in terse mode.
859
877
  */
860
878
  interface CheckPredicateSummary {
861
- checkKey: CheckKey;
862
- result: CheckResult;
879
+ checkKey: CheckKey;
880
+ result: CheckResult;
863
881
  }
864
882
  /**
865
883
  * A simplified/terse version of `CheckReport` that matches the
@@ -868,7 +886,7 @@ interface CheckPredicateSummary {
868
886
  * of 'failed', 'error', or 'skipped'.
869
887
  */
870
888
  interface CheckSummary {
871
- predicateSummaries: CheckPredicateSummary[];
889
+ predicateSummaries: CheckPredicateSummary[];
872
890
  }
873
891
  /**
874
892
  * Convert a full `CheckReport` to a simplified `CheckSummary` that includes
@@ -877,7 +895,7 @@ interface CheckSummary {
877
895
  * @param checkReport The full check report.
878
896
  * @return The converted check summary.
879
897
  */
880
- declare function checkSummaryFromReport(checkReport: CheckReport): CheckSummary;
898
+ export declare function checkSummaryFromReport(checkReport: CheckReport): CheckSummary;
881
899
  /**
882
900
  * Convert a simplified `CheckSummary` to a full `CheckReport` that restores the
883
901
  * structure of the tests from the given configuration.
@@ -887,112 +905,113 @@ declare function checkSummaryFromReport(checkReport: CheckReport): CheckSummary;
887
905
  * @param skipChecks The checks that were skipped when the original report was created.
888
906
  * @return The converted check report.
889
907
  */
890
- declare function checkReportFromSummary(checkConfig: CheckConfig, checkSummary: CheckSummary, skipChecks?: CheckNameSpec[]): CheckReport | undefined;
891
-
892
- type ComparisonDatasetName = string;
893
- type ComparisonDatasetSource = string;
908
+ export declare function checkReportFromSummary(checkConfig: CheckConfig, checkSummary: CheckSummary, skipChecks?: CheckNameSpec[]): CheckReport | undefined;
909
+ //#endregion
910
+ //#region src/comparison/config/comparison-spec-types.d.ts
911
+ export type ComparisonDatasetName = string;
912
+ export type ComparisonDatasetSource = string;
894
913
  /**
895
914
  * Specifies a dataset (variable) used for comparison.
896
915
  */
897
- interface ComparisonDatasetSpec {
898
- kind: 'dataset';
899
- /** The name of the dataset (variable). */
900
- name: ComparisonDatasetName;
901
- /**
902
- * The source of the dataset, if it is from an external data file. If
903
- * undefined, the dataset is assumed to be a model output.
904
- */
905
- source?: ComparisonDatasetSource;
906
- }
907
- type ComparisonScenarioId = string;
908
- type ComparisonScenarioTitle = string;
909
- type ComparisonScenarioSubtitle = string;
910
- type ComparisonScenarioInputName = string;
911
- type ComparisonScenarioInputPosition = 'default' | 'min' | 'max';
916
+ export interface ComparisonDatasetSpec {
917
+ kind: 'dataset';
918
+ /** The name of the dataset (variable). */
919
+ name: ComparisonDatasetName;
920
+ /**
921
+ * The source of the dataset, if it is from an external data file. If
922
+ * undefined, the dataset is assumed to be a model output.
923
+ */
924
+ source?: ComparisonDatasetSource;
925
+ }
926
+ export type ComparisonScenarioId = string;
927
+ export type ComparisonScenarioTitle = string;
928
+ export type ComparisonScenarioSubtitle = string;
929
+ export type ComparisonScenarioInputName = string;
930
+ export type ComparisonScenarioInputPosition = 'default' | 'min' | 'max';
912
931
  /**
913
932
  * Specifies an input that is set to a specific position (default / min / max).
914
933
  */
915
- interface ComparisonScenarioInputAtPositionSpec {
916
- kind: 'input-at-position';
917
- /** The requested input name or alias. */
918
- inputName: ComparisonScenarioInputName;
919
- /** The requested position of the input. */
920
- position: ComparisonScenarioInputPosition;
934
+ export interface ComparisonScenarioInputAtPositionSpec {
935
+ kind: 'input-at-position';
936
+ /** The requested input name or alias. */
937
+ inputName: ComparisonScenarioInputName;
938
+ /** The requested position of the input. */
939
+ position: ComparisonScenarioInputPosition;
921
940
  }
922
941
  /**
923
942
  * Specifies an input that is set to a specific number value.
924
943
  */
925
- interface ComparisonScenarioInputAtValueSpec {
926
- kind: 'input-at-value';
927
- /** The requested input name or alias. */
928
- inputName: ComparisonScenarioInputName;
929
- /** The number value of the input. */
930
- value: number;
944
+ export interface ComparisonScenarioInputAtValueSpec {
945
+ kind: 'input-at-value';
946
+ /** The requested input name or alias. */
947
+ inputName: ComparisonScenarioInputName;
948
+ /** The number value of the input. */
949
+ value: number;
931
950
  }
932
951
  /**
933
952
  * A single input setting for a scenario. An input can be set to a specific number value,
934
953
  * or it can be set to a "position" (default / min / max).
935
954
  */
936
- type ComparisonScenarioInputSpec = ComparisonScenarioInputAtPositionSpec | ComparisonScenarioInputAtValueSpec;
955
+ export type ComparisonScenarioInputSpec = ComparisonScenarioInputAtPositionSpec | ComparisonScenarioInputAtValueSpec;
937
956
  /**
938
957
  * Specifies a single scenario that sets one or more inputs to a value/position.
939
958
  */
940
- interface ComparisonScenarioWithInputsSpec {
941
- kind: 'scenario-with-inputs';
942
- /** The unique identifier for the scenario. */
943
- id?: ComparisonScenarioId;
944
- /** The title of the scenario. */
945
- title?: ComparisonScenarioTitle;
946
- /** The subtitle of the scenario. */
947
- subtitle?: ComparisonScenarioSubtitle;
948
- /** The input settings for this scenario. */
949
- inputs: ComparisonScenarioInputSpec[];
959
+ export interface ComparisonScenarioWithInputsSpec {
960
+ kind: 'scenario-with-inputs';
961
+ /** The unique identifier for the scenario. */
962
+ id?: ComparisonScenarioId;
963
+ /** The title of the scenario. */
964
+ title?: ComparisonScenarioTitle;
965
+ /** The subtitle of the scenario. */
966
+ subtitle?: ComparisonScenarioSubtitle;
967
+ /** The input settings for this scenario. */
968
+ inputs: ComparisonScenarioInputSpec[];
950
969
  }
951
970
  /**
952
971
  * Specifies a single scenario that configures inputs differently for the two
953
972
  * model instances.
954
973
  */
955
- interface ComparisonScenarioWithDistinctInputsSpec {
956
- kind: 'scenario-with-distinct-inputs';
957
- /** The unique identifier for the scenario. */
958
- id?: ComparisonScenarioId;
959
- /** The title of the scenario. */
960
- title?: ComparisonScenarioTitle;
961
- /** The subtitle of the scenario. */
962
- subtitle?: ComparisonScenarioSubtitle;
963
- /** The input settings for this scenario when run with the "left" model. */
964
- inputsL: ComparisonScenarioInputSpec[];
965
- /** The input settings for this scenario when run with the "right" model. */
966
- inputsR: ComparisonScenarioInputSpec[];
974
+ export interface ComparisonScenarioWithDistinctInputsSpec {
975
+ kind: 'scenario-with-distinct-inputs';
976
+ /** The unique identifier for the scenario. */
977
+ id?: ComparisonScenarioId;
978
+ /** The title of the scenario. */
979
+ title?: ComparisonScenarioTitle;
980
+ /** The subtitle of the scenario. */
981
+ subtitle?: ComparisonScenarioSubtitle;
982
+ /** The input settings for this scenario when run with the "left" model. */
983
+ inputsL: ComparisonScenarioInputSpec[];
984
+ /** The input settings for this scenario when run with the "right" model. */
985
+ inputsR: ComparisonScenarioInputSpec[];
967
986
  }
968
987
  /**
969
988
  * Specifies a single scenario that configures inputs according to the setting
970
989
  * group defined for each model instance.
971
990
  */
972
- interface ComparisonScenarioWithSettingGroupSpec {
973
- kind: 'scenario-with-setting-group';
974
- /** The unique identifier for the scenario. */
975
- id?: ComparisonScenarioId;
976
- /** The title of the scenario. */
977
- title?: ComparisonScenarioTitle;
978
- /** The subtitle of the scenario. */
979
- subtitle?: ComparisonScenarioSubtitle;
980
- /** The identifier of the input setting group as used in `ModelSpec.inputSettingGroups`. */
981
- settingGroupId: InputSettingGroupId;
991
+ export interface ComparisonScenarioWithSettingGroupSpec {
992
+ kind: 'scenario-with-setting-group';
993
+ /** The unique identifier for the scenario. */
994
+ id?: ComparisonScenarioId;
995
+ /** The title of the scenario. */
996
+ title?: ComparisonScenarioTitle;
997
+ /** The subtitle of the scenario. */
998
+ subtitle?: ComparisonScenarioSubtitle;
999
+ /** The identifier of the input setting group as used in `ModelSpec.inputSettingGroups`. */
1000
+ settingGroupId: InputSettingGroupId;
982
1001
  }
983
1002
  /**
984
1003
  * Specifies a single scenario that sets all available inputs to position.
985
1004
  */
986
- interface ComparisonScenarioWithAllInputsSpec {
987
- kind: 'scenario-with-all-inputs';
988
- /** The unique identifier for the scenario. */
989
- id?: ComparisonScenarioId;
990
- /** The title of the scenario. */
991
- title?: ComparisonScenarioTitle;
992
- /** The subtitle of the scenario. */
993
- subtitle?: ComparisonScenarioSubtitle;
994
- /** The position that will be used for all available inputs. */
995
- position: ComparisonScenarioInputPosition;
1005
+ export interface ComparisonScenarioWithAllInputsSpec {
1006
+ kind: 'scenario-with-all-inputs';
1007
+ /** The unique identifier for the scenario. */
1008
+ id?: ComparisonScenarioId;
1009
+ /** The title of the scenario. */
1010
+ title?: ComparisonScenarioTitle;
1011
+ /** The subtitle of the scenario. */
1012
+ subtitle?: ComparisonScenarioSubtitle;
1013
+ /** The position that will be used for all available inputs. */
1014
+ position: ComparisonScenarioInputPosition;
996
1015
  }
997
1016
  /**
998
1017
  * Special preset that expands to many scenarios:
@@ -1001,502 +1020,506 @@ interface ComparisonScenarioWithAllInputsSpec {
1001
1020
  * - one scenario with the input at its minimum
1002
1021
  * - one scenario with the input at its maximum
1003
1022
  */
1004
- interface ComparisonScenarioPresetMatrixSpec {
1005
- kind: 'scenario-matrix';
1023
+ export interface ComparisonScenarioPresetMatrixSpec {
1024
+ kind: 'scenario-matrix';
1006
1025
  }
1007
1026
  /**
1008
1027
  * A definition of input scenario(s). A scenario can set one input to a value/position, or it
1009
1028
  * can set multiple inputs to particular values/positions.
1010
1029
  */
1011
- type ComparisonScenarioSpec = ComparisonScenarioWithInputsSpec | ComparisonScenarioWithDistinctInputsSpec | ComparisonScenarioWithSettingGroupSpec | ComparisonScenarioWithAllInputsSpec | ComparisonScenarioPresetMatrixSpec;
1030
+ export type ComparisonScenarioSpec = ComparisonScenarioWithInputsSpec | ComparisonScenarioWithDistinctInputsSpec | ComparisonScenarioWithSettingGroupSpec | ComparisonScenarioWithAllInputsSpec | ComparisonScenarioPresetMatrixSpec;
1012
1031
  /** A reference to a scenario definition. */
1013
- interface ComparisonScenarioRefSpec {
1014
- kind: 'scenario-ref';
1015
- /** The ID of the scenario that is referenced. */
1016
- scenarioId: ComparisonScenarioId;
1017
- /** The optional title that is used instead of the referenced scenario's title. */
1018
- title?: ComparisonScenarioTitle;
1019
- /** The optional subtitle that is used instead of the referenced scenario's subtitle. */
1020
- subtitle?: ComparisonScenarioSubtitle;
1032
+ export interface ComparisonScenarioRefSpec {
1033
+ kind: 'scenario-ref';
1034
+ /** The ID of the scenario that is referenced. */
1035
+ scenarioId: ComparisonScenarioId;
1036
+ /** The optional title that is used instead of the referenced scenario's title. */
1037
+ title?: ComparisonScenarioTitle;
1038
+ /** The optional subtitle that is used instead of the referenced scenario's subtitle. */
1039
+ subtitle?: ComparisonScenarioSubtitle;
1021
1040
  }
1022
1041
  /** Spec type that allows for matching a comparison scenario by title and subtitle. */
1023
- interface ComparisonScenarioTitleSpec {
1024
- /** The title of a comparison scenario. */
1025
- title: string;
1026
- /** The subtitle of a comparison scenario. */
1027
- subtitle?: string;
1042
+ export interface ComparisonScenarioTitleSpec {
1043
+ /** The title of a comparison scenario. */
1044
+ title: string;
1045
+ /** The subtitle of a comparison scenario. */
1046
+ subtitle?: string;
1028
1047
  }
1029
- type ComparisonScenarioGroupId = string;
1030
- type ComparisonScenarioGroupTitle = string;
1048
+ export type ComparisonScenarioGroupId = string;
1049
+ export type ComparisonScenarioGroupTitle = string;
1031
1050
  /**
1032
1051
  * A definition of a group of input scenarios. Multiple scenarios can be grouped together under a single name, and
1033
1052
  * can later be referenced by group ID in a view definition.
1034
1053
  */
1035
- interface ComparisonScenarioGroupSpec {
1036
- kind: 'scenario-group';
1037
- /** The unique identifier for the group. */
1038
- id?: ComparisonScenarioGroupId;
1039
- /** The title of the group. */
1040
- title: ComparisonScenarioGroupTitle;
1041
- /** The scenarios that are included in this group. */
1042
- scenarios: (ComparisonScenarioSpec | ComparisonScenarioRefSpec)[];
1054
+ export interface ComparisonScenarioGroupSpec {
1055
+ kind: 'scenario-group';
1056
+ /** The unique identifier for the group. */
1057
+ id?: ComparisonScenarioGroupId;
1058
+ /** The title of the group. */
1059
+ title: ComparisonScenarioGroupTitle;
1060
+ /** The scenarios that are included in this group. */
1061
+ scenarios: (ComparisonScenarioSpec | ComparisonScenarioRefSpec)[];
1043
1062
  }
1044
1063
  /** A reference to a scenario group definition. */
1045
- interface ComparisonScenarioGroupRefSpec {
1046
- kind: 'scenario-group-ref';
1047
- /** The ID of the scenario group that is referenced. */
1048
- groupId: ComparisonScenarioGroupId;
1064
+ export interface ComparisonScenarioGroupRefSpec {
1065
+ kind: 'scenario-group-ref';
1066
+ /** The ID of the scenario group that is referenced. */
1067
+ groupId: ComparisonScenarioGroupId;
1049
1068
  }
1050
- type ComparisonGraphId = string;
1069
+ export type ComparisonGraphId = string;
1051
1070
  /**
1052
1071
  * Specifies a list of graphs to be shown in a view.
1053
1072
  */
1054
- interface ComparisonGraphsArraySpec {
1055
- kind: 'graphs-array';
1056
- /** The array of IDs for graphs to show. */
1057
- graphIds: ComparisonGraphId[];
1073
+ export interface ComparisonGraphsArraySpec {
1074
+ kind: 'graphs-array';
1075
+ /** The array of IDs for graphs to show. */
1076
+ graphIds: ComparisonGraphId[];
1058
1077
  }
1059
1078
  /**
1060
1079
  * Specifies a preset list of graphs to be shown in a view.
1061
1080
  */
1062
- interface ComparisonGraphsPresetSpec {
1063
- kind: 'graphs-preset';
1064
- /** The preset (currently only "all" is supported, which shows all available graphs). */
1065
- preset: 'all';
1081
+ export interface ComparisonGraphsPresetSpec {
1082
+ kind: 'graphs-preset';
1083
+ /** The preset (currently only "all" is supported, which shows all available graphs). */
1084
+ preset: 'all';
1066
1085
  }
1067
- type ComparisonGraphGroupId = string;
1086
+ export type ComparisonGraphGroupId = string;
1068
1087
  /**
1069
1088
  * A definition of a group of graphs to be shown in a view. Multiple graphs can be grouped together
1070
1089
  * under a single ID, and can later be referenced by group ID in a view definition.
1071
1090
  */
1072
- interface ComparisonGraphGroupSpec {
1073
- kind: 'graph-group';
1074
- /** The unique identifier for the group. */
1075
- id: ComparisonGraphGroupId;
1076
- /** The graphs that are included in this group. */
1077
- graphIds: ComparisonGraphId[];
1091
+ export interface ComparisonGraphGroupSpec {
1092
+ kind: 'graph-group';
1093
+ /** The unique identifier for the group. */
1094
+ id: ComparisonGraphGroupId;
1095
+ /** The graphs that are included in this group. */
1096
+ graphIds: ComparisonGraphId[];
1078
1097
  }
1079
1098
  /** A reference to a graph group definition. */
1080
- interface ComparisonGraphGroupRefSpec {
1081
- kind: 'graph-group-ref';
1082
- /** The ID of the graph group that is referenced. */
1083
- groupId: ComparisonGraphGroupId;
1084
- }
1085
- type ComparisonViewTitle = string;
1086
- type ComparisonViewSubtitle = string;
1087
- type ComparisonViewRowTitle = string;
1088
- type ComparisonViewRowSubtitle = string;
1089
- type ComparisonViewItemTitle = string;
1090
- type ComparisonViewItemSubtitle = string;
1091
- type ComparisonViewGraphOrder = 'default' | 'grouped-by-diffs';
1099
+ export interface ComparisonGraphGroupRefSpec {
1100
+ kind: 'graph-group-ref';
1101
+ /** The ID of the graph group that is referenced. */
1102
+ groupId: ComparisonGraphGroupId;
1103
+ }
1104
+ export type ComparisonViewTitle = string;
1105
+ export type ComparisonViewSubtitle = string;
1106
+ export type ComparisonViewRowTitle = string;
1107
+ export type ComparisonViewRowSubtitle = string;
1108
+ export type ComparisonViewItemTitle = string;
1109
+ export type ComparisonViewItemSubtitle = string;
1110
+ export type ComparisonViewGraphOrder = 'default' | 'grouped-by-diffs';
1092
1111
  /**
1093
1112
  * Specifies a single comparison box to be shown in a view.
1094
1113
  */
1095
- interface ComparisonViewBoxSpec {
1096
- kind: 'view-box';
1097
- /** The title of the box. */
1098
- title: ComparisonViewItemTitle;
1099
- /** The subtitle of the box. */
1100
- subtitle?: ComparisonViewItemSubtitle;
1101
- /** The dataset shown in this comparison box. */
1102
- dataset: ComparisonDatasetSpec;
1103
- /** The scenario shown in this comparison box. */
1104
- scenarioId: ComparisonScenarioId;
1114
+ export interface ComparisonViewBoxSpec {
1115
+ kind: 'view-box';
1116
+ /** The title of the box. */
1117
+ title: ComparisonViewItemTitle;
1118
+ /** The subtitle of the box. */
1119
+ subtitle?: ComparisonViewItemSubtitle;
1120
+ /** The dataset shown in this comparison box. */
1121
+ dataset: ComparisonDatasetSpec;
1122
+ /** The scenario shown in this comparison box. */
1123
+ scenarioId: ComparisonScenarioId;
1105
1124
  }
1106
1125
  /**
1107
1126
  * Specifies a row of comparison boxes to be shown in a view.
1108
1127
  */
1109
- interface ComparisonViewRowSpec {
1110
- kind: 'view-row';
1111
- /** The title of the row. */
1112
- title: ComparisonViewRowTitle;
1113
- /** The subtitle of the row. */
1114
- subtitle?: ComparisonViewRowSubtitle;
1115
- /** The array of boxes to be shown in the row. */
1116
- boxes: ComparisonViewBoxSpec[];
1128
+ export interface ComparisonViewRowSpec {
1129
+ kind: 'view-row';
1130
+ /** The title of the row. */
1131
+ title: ComparisonViewRowTitle;
1132
+ /** The subtitle of the row. */
1133
+ subtitle?: ComparisonViewRowSubtitle;
1134
+ /** The array of boxes to be shown in the row. */
1135
+ boxes: ComparisonViewBoxSpec[];
1117
1136
  }
1118
1137
  /**
1119
1138
  * Specifies a set of graphs to be shown in a view.
1120
1139
  */
1121
- type ComparisonViewGraphsSpec = ComparisonGraphsPresetSpec | ComparisonGraphsArraySpec | ComparisonGraphGroupRefSpec;
1140
+ export type ComparisonViewGraphsSpec = ComparisonGraphsPresetSpec | ComparisonGraphsArraySpec | ComparisonGraphGroupRefSpec;
1122
1141
  /**
1123
1142
  * A definition of a view. A view presents a set of graphs, either for a single input scenario
1124
1143
  * or for a mix of different dataset/scenario combinations.
1125
1144
  */
1126
- interface ComparisonViewSpec {
1127
- kind: 'view';
1128
- /** The title of the view. If undefined, the title will be inferred from the scenario. */
1129
- title?: ComparisonViewTitle;
1130
- /** The subtitle of the view. If undefined, the subtitle will be inferred from the scenario. */
1131
- subtitle?: ComparisonViewSubtitle;
1132
- /** The scenario to be shown in the view if this is a single-scenario view. */
1133
- scenarioId?: ComparisonScenarioId;
1134
- /** The array of rows to be shown in the view if this is a freeform view. */
1135
- rows?: ComparisonViewRowSpec[];
1136
- /** The graphs to be shown in the view. */
1137
- graphs?: ComparisonViewGraphsSpec;
1138
- /**
1139
- * The order in which the graphs will be displayed. If undefined, the graphs will be
1140
- * displayed in the "default" order, i.e., in the same order that the IDs were specified.
1141
- */
1142
- graphOrder?: ComparisonViewGraphOrder;
1143
- }
1144
- type ComparisonViewGroupTitle = string;
1145
+ export interface ComparisonViewSpec {
1146
+ kind: 'view';
1147
+ /** The title of the view. If undefined, the title will be inferred from the scenario. */
1148
+ title?: ComparisonViewTitle;
1149
+ /** The subtitle of the view. If undefined, the subtitle will be inferred from the scenario. */
1150
+ subtitle?: ComparisonViewSubtitle;
1151
+ /** The scenario to be shown in the view if this is a single-scenario view. */
1152
+ scenarioId?: ComparisonScenarioId;
1153
+ /** The array of rows to be shown in the view if this is a freeform view. */
1154
+ rows?: ComparisonViewRowSpec[];
1155
+ /** The graphs to be shown in the view. */
1156
+ graphs?: ComparisonViewGraphsSpec;
1157
+ /**
1158
+ * The order in which the graphs will be displayed. If undefined, the graphs will be
1159
+ * displayed in the "default" order, i.e., in the same order that the IDs were specified.
1160
+ */
1161
+ graphOrder?: ComparisonViewGraphOrder;
1162
+ }
1163
+ export type ComparisonViewGroupTitle = string;
1145
1164
  /**
1146
1165
  * Specifies a view group with an explicit array of view definitions.
1147
1166
  */
1148
- interface ComparisonViewGroupWithViewsSpec {
1149
- kind: 'view-group-with-views';
1150
- /** The title of the group of views. */
1151
- title: ComparisonViewGroupTitle;
1152
- /** The views that are included in this group. */
1153
- views: ComparisonViewSpec[];
1167
+ export interface ComparisonViewGroupWithViewsSpec {
1168
+ kind: 'view-group-with-views';
1169
+ /** The title of the group of views. */
1170
+ title: ComparisonViewGroupTitle;
1171
+ /** The views that are included in this group. */
1172
+ views: ComparisonViewSpec[];
1154
1173
  }
1155
1174
  /**
1156
1175
  * Specifies a view group by declaring the scenarios included in the group (one view per scenario), along
1157
1176
  * with a set of graphs that will shown in each view.
1158
1177
  */
1159
- interface ComparisonViewGroupWithScenariosSpec {
1160
- kind: 'view-group-with-scenarios';
1161
- /** The title of the group of views. */
1162
- title: ComparisonViewGroupTitle;
1163
- /** The scenarios to be included (one view will be created for each scenario). */
1164
- scenarios: (ComparisonScenarioRefSpec | ComparisonScenarioGroupRefSpec)[];
1165
- /** The graphs to be shown for each scenario view. */
1166
- graphs: ComparisonViewGraphsSpec;
1167
- /**
1168
- * The order in which the graphs will be displayed. If undefined, the graphs will be
1169
- * displayed in the "default" order, i.e., in the same order that the IDs were specified.
1170
- */
1171
- graphOrder?: ComparisonViewGraphOrder;
1178
+ export interface ComparisonViewGroupWithScenariosSpec {
1179
+ kind: 'view-group-with-scenarios';
1180
+ /** The title of the group of views. */
1181
+ title: ComparisonViewGroupTitle;
1182
+ /** The scenarios to be included (one view will be created for each scenario). */
1183
+ scenarios: (ComparisonScenarioRefSpec | ComparisonScenarioGroupRefSpec)[];
1184
+ /** The graphs to be shown for each scenario view. */
1185
+ graphs: ComparisonViewGraphsSpec;
1186
+ /**
1187
+ * The order in which the graphs will be displayed. If undefined, the graphs will be
1188
+ * displayed in the "default" order, i.e., in the same order that the IDs were specified.
1189
+ */
1190
+ graphOrder?: ComparisonViewGraphOrder;
1172
1191
  }
1173
1192
  /**
1174
1193
  * A definition of a group of views. Multiple related views can be grouped together under a single title
1175
1194
  * to make them easy to distinguish in a report.
1176
1195
  */
1177
- type ComparisonViewGroupSpec = ComparisonViewGroupWithViewsSpec | ComparisonViewGroupWithScenariosSpec;
1196
+ export type ComparisonViewGroupSpec = ComparisonViewGroupWithViewsSpec | ComparisonViewGroupWithScenariosSpec;
1178
1197
  /**
1179
1198
  * Contains the scenario and view definitions from one or more sources (JSON/YAML files or manually
1180
1199
  * defined specs).
1181
1200
  */
1182
- interface ComparisonSpecs {
1183
- /** The requested scenarios. */
1184
- scenarios?: ComparisonScenarioSpec[];
1185
- /** The requested scenario groups. */
1186
- scenarioGroups?: ComparisonScenarioGroupSpec[];
1187
- /** The requested graph groups. */
1188
- graphGroups?: ComparisonGraphGroupSpec[];
1189
- /** The requested view groups. */
1190
- viewGroups?: ComparisonViewGroupSpec[];
1201
+ export interface ComparisonSpecs {
1202
+ /** The requested scenarios. */
1203
+ scenarios?: ComparisonScenarioSpec[];
1204
+ /** The requested scenario groups. */
1205
+ scenarioGroups?: ComparisonScenarioGroupSpec[];
1206
+ /** The requested graph groups. */
1207
+ graphGroups?: ComparisonGraphGroupSpec[];
1208
+ /** The requested view groups. */
1209
+ viewGroups?: ComparisonViewGroupSpec[];
1191
1210
  }
1192
1211
  /** A source of comparison scenario and specifications. */
1193
- interface ComparisonSpecsSource {
1194
- kind: 'yaml' | 'json';
1195
- /** The source filename, if known. */
1196
- filename?: string;
1197
- /** A string containing YAML or JSON content. */
1198
- content: string;
1199
- }
1200
-
1212
+ export interface ComparisonSpecsSource {
1213
+ kind: 'yaml' | 'json';
1214
+ /** The source filename, if known. */
1215
+ filename?: string;
1216
+ /** A string containing YAML or JSON content. */
1217
+ content: string;
1218
+ }
1219
+ //#endregion
1220
+ //#region src/comparison/_shared/comparison-resolved-types.d.ts
1201
1221
  /** A resolved dataset that is being compared. */
1202
- interface ComparisonDataset {
1203
- kind: 'dataset';
1204
- /** The unique key for the dataset (i.e., output variable or static data). */
1205
- key: DatasetKey;
1206
- /**
1207
- * The resolved output variable from the "left" model that corresponds to this dataset,
1208
- * or undefined if the variable is not defined in the left model.
1209
- */
1210
- outputVarL?: OutputVar;
1211
- /**
1212
- * The resolved output variable from the "right" model that corresponds to this dataset,
1213
- * or undefined if the variable is not defined in the right model.
1214
- */
1215
- outputVarR?: OutputVar;
1222
+ export interface ComparisonDataset {
1223
+ kind: 'dataset';
1224
+ /** The unique key for the dataset (i.e., output variable or static data). */
1225
+ key: DatasetKey;
1226
+ /**
1227
+ * The resolved output variable from the "left" model that corresponds to this dataset,
1228
+ * or undefined if the variable is not defined in the left model.
1229
+ */
1230
+ outputVarL?: OutputVar;
1231
+ /**
1232
+ * The resolved output variable from the "right" model that corresponds to this dataset,
1233
+ * or undefined if the variable is not defined in the right model.
1234
+ */
1235
+ outputVarR?: OutputVar;
1216
1236
  }
1217
1237
  /** A unique key for a `ComparisonScenario`, generated internally for use by the library. */
1218
- type ComparisonScenarioKey = string & {
1219
- _brand?: 'ComparisonScenarioKey';
1238
+ export type ComparisonScenarioKey = string & {
1239
+ _brand?: 'ComparisonScenarioKey';
1220
1240
  };
1221
1241
  /** A fatal error indicating that no input variable matched the requested name. */
1222
- interface ComparisonResolverUnknownInputError {
1223
- kind: 'unknown-input';
1242
+ export interface ComparisonResolverUnknownInputError {
1243
+ kind: 'unknown-input';
1224
1244
  }
1225
1245
  /** A fatal error indicating that no input setting group matched the requested ID. */
1226
- interface ComparisonResolverUnknownInputSettingGroupError {
1227
- kind: 'unknown-input-setting-group';
1246
+ export interface ComparisonResolverUnknownInputSettingGroupError {
1247
+ kind: 'unknown-input-setting-group';
1228
1248
  }
1229
1249
  /**
1230
1250
  * A fatal resolution error. When this is set on an input state, the scenario
1231
1251
  * cannot be run for the affected side: spec construction for that side is
1232
1252
  * skipped and downstream UI annotations render it as an error.
1233
1253
  */
1234
- type ComparisonResolverError = ComparisonResolverUnknownInputError | ComparisonResolverUnknownInputSettingGroupError;
1254
+ export type ComparisonResolverError = ComparisonResolverUnknownInputError | ComparisonResolverUnknownInputSettingGroupError;
1235
1255
  /**
1236
1256
  * A non-fatal warning indicating that the resolved value falls outside the
1237
1257
  * declared `[minValue, maxValue]` range of a slider (or is not one of the
1238
1258
  * declared values of a switch). The scenario still runs with the requested
1239
1259
  * value; consumers (e.g. UI annotations) should flag it as a warning.
1240
1260
  */
1241
- interface ComparisonResolverValueOutOfRangeWarning {
1242
- kind: 'value-out-of-range';
1261
+ export interface ComparisonResolverValueOutOfRangeWarning {
1262
+ kind: 'value-out-of-range';
1243
1263
  }
1244
1264
  /**
1245
1265
  * A non-fatal resolution warning. Warnings do not prevent the scenario from
1246
1266
  * running; they are surfaced as annotations alongside the resolved value.
1247
1267
  */
1248
- type ComparisonResolverWarning = ComparisonResolverValueOutOfRangeWarning;
1268
+ export type ComparisonResolverWarning = ComparisonResolverValueOutOfRangeWarning;
1249
1269
  /** Describes the resolution state for a scenario input relative to a specific model. */
1250
- interface ComparisonScenarioInputState {
1251
- /** The matched input variable; can be undefined if no input matched. */
1252
- inputVar?: InputVar;
1253
- /** The position of the input, if this is a position scenario. */
1254
- position?: InputPosition;
1255
- /** The value of the input, for the given position or explicit value. */
1256
- value?: number;
1257
- /** The fatal error info if the input could not be resolved. */
1258
- error?: ComparisonResolverError;
1259
- /**
1260
- * Non-fatal advisory info about the resolved input. When set (without an
1261
- * accompanying `error`), the input still resolved and the scenario can run;
1262
- * consumers should surface the warning alongside the resolved value.
1263
- */
1264
- warning?: ComparisonResolverWarning;
1270
+ export interface ComparisonScenarioInputState {
1271
+ /** The matched input variable; can be undefined if no input matched. */
1272
+ inputVar?: InputVar;
1273
+ /** The position of the input, if this is a position scenario. */
1274
+ position?: InputPosition;
1275
+ /** The value of the input, for the given position or explicit value. */
1276
+ value?: number;
1277
+ /** The fatal error info if the input could not be resolved. */
1278
+ error?: ComparisonResolverError;
1279
+ /**
1280
+ * Non-fatal advisory info about the resolved input. When set (without an
1281
+ * accompanying `error`), the input still resolved and the scenario can run;
1282
+ * consumers should surface the warning alongside the resolved value.
1283
+ */
1284
+ warning?: ComparisonResolverWarning;
1265
1285
  }
1266
1286
  /** A scenario input that has been checked against both "left" and "right" model. */
1267
- interface ComparisonScenarioInput {
1268
- /** The requested name of the input. */
1269
- requestedName: string;
1270
- /** The resolved state of the input for the "left" model. */
1271
- stateL: ComparisonScenarioInputState;
1272
- /** The resolved state of the input for the "right" model. */
1273
- stateR: ComparisonScenarioInputState;
1287
+ export interface ComparisonScenarioInput {
1288
+ /** The requested name of the input. */
1289
+ requestedName: string;
1290
+ /** The resolved state of the input for the "left" model. */
1291
+ stateL: ComparisonScenarioInputState;
1292
+ /** The resolved state of the input for the "right" model. */
1293
+ stateR: ComparisonScenarioInputState;
1274
1294
  }
1275
1295
  /** A configuration that sets model inputs to specific values. */
1276
- interface ComparisonScenarioInputSettings {
1277
- kind: 'input-settings';
1278
- /** The resolutions for the specified inputs in the scenario. */
1279
- inputs: ComparisonScenarioInput[];
1280
- /**
1281
- * Whether the settings differ between the "left" and "right" models. This is
1282
- * typically only used in the case of a scenario based on model-specific setting
1283
- * groups, where the set of inputs or the input values differ between the two models.
1284
- */
1285
- settingsDiffer?: boolean;
1296
+ export interface ComparisonScenarioInputSettings {
1297
+ kind: 'input-settings';
1298
+ /** The resolutions for the specified inputs in the scenario. */
1299
+ inputs: ComparisonScenarioInput[];
1300
+ /**
1301
+ * Whether the settings differ between the "left" and "right" models. This is
1302
+ * typically only used in the case of a scenario based on model-specific setting
1303
+ * groups, where the set of inputs or the input values differ between the two models.
1304
+ */
1305
+ settingsDiffer?: boolean;
1286
1306
  }
1287
1307
  /** A configuration that sets all inputs in the model to a certain position. */
1288
- interface ComparisonScenarioAllInputsSettings {
1289
- kind: 'all-inputs-settings';
1290
- /** The input position that will be applied to all available inputs. */
1291
- position: InputPosition;
1308
+ export interface ComparisonScenarioAllInputsSettings {
1309
+ kind: 'all-inputs-settings';
1310
+ /** The input position that will be applied to all available inputs. */
1311
+ position: InputPosition;
1292
1312
  }
1293
1313
  /**
1294
1314
  * The configuration for an input scenario, either a set of individual input settings, or one
1295
1315
  * that sets all inputs in the model to a certain position.
1296
1316
  */
1297
- type ComparisonScenarioSettings = ComparisonScenarioInputSettings | ComparisonScenarioAllInputsSettings;
1317
+ export type ComparisonScenarioSettings = ComparisonScenarioInputSettings | ComparisonScenarioAllInputsSettings;
1298
1318
  /** A single resolved input scenario. */
1299
- interface ComparisonScenario {
1300
- kind: 'scenario';
1301
- /** The unique key for the scenario, generated internally for use by the library. */
1302
- key: ComparisonScenarioKey;
1303
- /** The unique user-defined identifier for the scenario. */
1304
- id?: ComparisonScenarioId;
1305
- /** The scenario title. */
1306
- title: string;
1307
- /** The scenario subtitle. */
1308
- subtitle?: string;
1309
- /** The resolved settings for the model inputs in this scenario. */
1310
- settings: ComparisonScenarioSettings;
1311
- /** The input scenario used to configure the "left" model, or undefined if data not available. */
1312
- specL?: ScenarioSpec;
1313
- /** The input scenario used to configure the "right" model, or undefined if data not available. */
1314
- specR?: ScenarioSpec;
1319
+ export interface ComparisonScenario {
1320
+ kind: 'scenario';
1321
+ /** The unique key for the scenario, generated internally for use by the library. */
1322
+ key: ComparisonScenarioKey;
1323
+ /** The unique user-defined identifier for the scenario. */
1324
+ id?: ComparisonScenarioId;
1325
+ /** The scenario title. */
1326
+ title: string;
1327
+ /** The scenario subtitle. */
1328
+ subtitle?: string;
1329
+ /** The resolved settings for the model inputs in this scenario. */
1330
+ settings: ComparisonScenarioSettings;
1331
+ /** The input scenario used to configure the "left" model, or undefined if data not available. */
1332
+ specL?: ScenarioSpec;
1333
+ /** The input scenario used to configure the "right" model, or undefined if data not available. */
1334
+ specR?: ScenarioSpec;
1315
1335
  }
1316
1336
  /** An unresolved input scenario reference. */
1317
- interface ComparisonUnresolvedScenarioRef {
1318
- kind: 'unresolved-scenario-ref';
1319
- /** The ID of the referenced scenario that could not be resolved. */
1320
- scenarioId: ComparisonScenarioId;
1337
+ export interface ComparisonUnresolvedScenarioRef {
1338
+ kind: 'unresolved-scenario-ref';
1339
+ /** The ID of the referenced scenario that could not be resolved. */
1340
+ scenarioId: ComparisonScenarioId;
1321
1341
  }
1322
1342
  /** A resolved group of input scenarios. */
1323
- interface ComparisonScenarioGroup {
1324
- kind: 'scenario-group';
1325
- /** The unique identifier for the group. */
1326
- id?: ComparisonScenarioGroupId;
1327
- /** The title of the group. */
1328
- title: ComparisonScenarioGroupTitle;
1329
- /**
1330
- * The scenarios that are included in this group. This includes scenarios that were successfully
1331
- * resolved as well as scenario references that could not be resolved.
1332
- */
1333
- scenarios: (ComparisonScenario | ComparisonUnresolvedScenarioRef)[];
1343
+ export interface ComparisonScenarioGroup {
1344
+ kind: 'scenario-group';
1345
+ /** The unique identifier for the group. */
1346
+ id?: ComparisonScenarioGroupId;
1347
+ /** The title of the group. */
1348
+ title: ComparisonScenarioGroupTitle;
1349
+ /**
1350
+ * The scenarios that are included in this group. This includes scenarios that were successfully
1351
+ * resolved as well as scenario references that could not be resolved.
1352
+ */
1353
+ scenarios: (ComparisonScenario | ComparisonUnresolvedScenarioRef)[];
1334
1354
  }
1335
1355
  /** An unresolved scenario group reference. */
1336
- interface ComparisonUnresolvedScenarioGroupRef {
1337
- kind: 'unresolved-scenario-group-ref';
1338
- /** The ID of the referenced scenario group that could not be resolved. */
1339
- scenarioGroupId: ComparisonScenarioGroupId;
1356
+ export interface ComparisonUnresolvedScenarioGroupRef {
1357
+ kind: 'unresolved-scenario-group-ref';
1358
+ /** The ID of the referenced scenario group that could not be resolved. */
1359
+ scenarioGroupId: ComparisonScenarioGroupId;
1340
1360
  }
1341
1361
  /** A resolved group of graphs. */
1342
- interface ComparisonGraphGroup {
1343
- kind: 'graph-group';
1344
- /** The unique identifier for the group. */
1345
- id: ComparisonScenarioGroupId;
1346
- /** The graphs that are included in this group. */
1347
- graphIds: ComparisonGraphId[];
1362
+ export interface ComparisonGraphGroup {
1363
+ kind: 'graph-group';
1364
+ /** The unique identifier for the group. */
1365
+ id: ComparisonScenarioGroupId;
1366
+ /** The graphs that are included in this group. */
1367
+ graphIds: ComparisonGraphId[];
1348
1368
  }
1349
1369
  /**
1350
1370
  * A resolved comparison box to be shown in a view.
1351
1371
  */
1352
- interface ComparisonViewBox {
1353
- kind: 'view-box';
1354
- /** The title of the box. */
1355
- title: ComparisonViewItemTitle;
1356
- /** The subtitle of the box. */
1357
- subtitle?: ComparisonViewItemSubtitle;
1358
- /** The resolved dataset shown in this comparison box. */
1359
- dataset: ComparisonDataset;
1360
- /** The resolved scenario shown in this comparison box. */
1361
- scenario: ComparisonScenario;
1372
+ export interface ComparisonViewBox {
1373
+ kind: 'view-box';
1374
+ /** The title of the box. */
1375
+ title: ComparisonViewItemTitle;
1376
+ /** The subtitle of the box. */
1377
+ subtitle?: ComparisonViewItemSubtitle;
1378
+ /** The resolved dataset shown in this comparison box. */
1379
+ dataset: ComparisonDataset;
1380
+ /** The resolved scenario shown in this comparison box. */
1381
+ scenario: ComparisonScenario;
1362
1382
  }
1363
1383
  /**
1364
1384
  * A resolved row of comparison boxes to be shown in a view.
1365
1385
  */
1366
- interface ComparisonViewRow {
1367
- kind: 'view-row';
1368
- /** The title of the row. */
1369
- title: ComparisonViewRowTitle;
1370
- /** The subtitle of the row. */
1371
- subtitle?: ComparisonViewRowSubtitle;
1372
- /** The array of resolved boxes to be shown in the row. */
1373
- boxes: ComparisonViewBox[];
1386
+ export interface ComparisonViewRow {
1387
+ kind: 'view-row';
1388
+ /** The title of the row. */
1389
+ title: ComparisonViewRowTitle;
1390
+ /** The subtitle of the row. */
1391
+ subtitle?: ComparisonViewRowSubtitle;
1392
+ /** The array of resolved boxes to be shown in the row. */
1393
+ boxes: ComparisonViewBox[];
1374
1394
  }
1375
1395
  /**
1376
1396
  * A resolved view definition. A view presents a set of graphs, either for a single input scenario
1377
1397
  * or for a mix of different dataset/scenario combinations.
1378
1398
  */
1379
- interface ComparisonView {
1380
- kind: 'view';
1381
- /** The title of the view. */
1382
- title: ComparisonViewTitle;
1383
- /** The subtitle of the view. */
1384
- subtitle?: ComparisonViewSubtitle;
1385
- /** The resolved scenario to be shown in the view if this is a single-scenario view. */
1386
- scenario?: ComparisonScenario;
1387
- /** The array of resolved rows to be shown in the view if this is a freeform view. */
1388
- rows?: ComparisonViewRow[];
1389
- /** The graphs to be shown for each scenario view. */
1390
- graphIds: ComparisonGraphId[];
1391
- /** The order in which the graphs will be displayed. */
1392
- graphOrder: ComparisonViewGraphOrder;
1399
+ export interface ComparisonView {
1400
+ kind: 'view';
1401
+ /** The title of the view. */
1402
+ title: ComparisonViewTitle;
1403
+ /** The subtitle of the view. */
1404
+ subtitle?: ComparisonViewSubtitle;
1405
+ /** The resolved scenario to be shown in the view if this is a single-scenario view. */
1406
+ scenario?: ComparisonScenario;
1407
+ /** The array of resolved rows to be shown in the view if this is a freeform view. */
1408
+ rows?: ComparisonViewRow[];
1409
+ /** The graphs to be shown for each scenario view. */
1410
+ graphIds: ComparisonGraphId[];
1411
+ /** The order in which the graphs will be displayed. */
1412
+ graphOrder: ComparisonViewGraphOrder;
1393
1413
  }
1394
1414
  /** An unresolved view. */
1395
- interface ComparisonUnresolvedView {
1396
- kind: 'unresolved-view';
1397
- /** The requested title of the view, if provided. */
1398
- title?: ComparisonViewTitle;
1399
- /** The requested subtitle of the view, if provided. */
1400
- subtitle?: ComparisonViewSubtitle;
1401
- /** The name of the referenced dataset that could not be resolved. */
1402
- datasetName?: ComparisonDatasetName;
1403
- /** The source of the referenced dataset that could not be resolved. */
1404
- datasetSource?: ComparisonDatasetSource;
1405
- /** The ID of the referenced scenario that could not be resolved. */
1406
- scenarioId?: ComparisonScenarioId;
1407
- /** The ID of the referenced scenario group that could not be resolved. */
1408
- scenarioGroupId?: ComparisonScenarioGroupId;
1415
+ export interface ComparisonUnresolvedView {
1416
+ kind: 'unresolved-view';
1417
+ /** The requested title of the view, if provided. */
1418
+ title?: ComparisonViewTitle;
1419
+ /** The requested subtitle of the view, if provided. */
1420
+ subtitle?: ComparisonViewSubtitle;
1421
+ /** The name of the referenced dataset that could not be resolved. */
1422
+ datasetName?: ComparisonDatasetName;
1423
+ /** The source of the referenced dataset that could not be resolved. */
1424
+ datasetSource?: ComparisonDatasetSource;
1425
+ /** The ID of the referenced scenario that could not be resolved. */
1426
+ scenarioId?: ComparisonScenarioId;
1427
+ /** The ID of the referenced scenario group that could not be resolved. */
1428
+ scenarioGroupId?: ComparisonScenarioGroupId;
1409
1429
  }
1410
1430
  /** A resolved group of compared scenario/graph views. */
1411
- interface ComparisonViewGroup {
1412
- kind: 'view-group';
1413
- /** The title of the group of views. */
1414
- title: ComparisonViewGroupTitle;
1415
- /** The array of resolved (and unresolved) views that are included in this group. */
1416
- views: (ComparisonView | ComparisonUnresolvedView)[];
1431
+ export interface ComparisonViewGroup {
1432
+ kind: 'view-group';
1433
+ /** The title of the group of views. */
1434
+ title: ComparisonViewGroupTitle;
1435
+ /** The array of resolved (and unresolved) views that are included in this group. */
1436
+ views: (ComparisonView | ComparisonUnresolvedView)[];
1417
1437
  }
1418
-
1438
+ //#endregion
1439
+ //#region src/perf/perf-stats.d.ts
1419
1440
  /**
1420
1441
  * A summary of timing samples collected during a performance run.
1421
1442
  */
1422
1443
  interface PerfReport {
1423
- /** Minimum sample time, in milliseconds. */
1424
- readonly minTime: number;
1425
- /** Maximum sample time, in milliseconds. */
1426
- readonly maxTime: number;
1427
- /**
1428
- * Trimmed mean (interquartile mean) computed from the middle 50% of samples,
1429
- * in milliseconds. This is more robust against outliers than a simple mean.
1430
- */
1431
- readonly avgTime: number;
1432
- /** Median (50th percentile) sample time, in milliseconds. */
1433
- readonly medianTime: number;
1434
- /** 95th percentile sample time, in milliseconds. */
1435
- readonly p95Time: number;
1436
- /** Population standard deviation across all samples, in milliseconds. */
1437
- readonly stdDev: number;
1438
- /** All recorded sample times, sorted ascending, in milliseconds. */
1439
- readonly allTimes: number[];
1444
+ /** Minimum sample time, in milliseconds. */
1445
+ readonly minTime: number;
1446
+ /** Maximum sample time, in milliseconds. */
1447
+ readonly maxTime: number;
1448
+ /**
1449
+ * Trimmed mean (interquartile mean) computed from the middle 50% of samples,
1450
+ * in milliseconds. This is more robust against outliers than a simple mean.
1451
+ */
1452
+ readonly avgTime: number;
1453
+ /** Median (50th percentile) sample time, in milliseconds. */
1454
+ readonly medianTime: number;
1455
+ /** 95th percentile sample time, in milliseconds. */
1456
+ readonly p95Time: number;
1457
+ /** Population standard deviation across all samples, in milliseconds. */
1458
+ readonly stdDev: number;
1459
+ /** All recorded sample times, sorted ascending, in milliseconds. */
1460
+ readonly allTimes: number[];
1440
1461
  }
1441
1462
  /**
1442
1463
  * Collect performance timing samples and produce a robust statistical summary.
1443
1464
  */
1444
- declare class PerfStats {
1445
- private readonly times;
1446
- /**
1447
- * Record a single run time sample.
1448
- *
1449
- * @param timeInMillis The run time in milliseconds.
1450
- */
1451
- addRun(timeInMillis: number): void;
1452
- /**
1453
- * Get the raw run time samples that have been recorded.
1454
- *
1455
- * @returns A copy of the recorded run times, in insertion order.
1456
- */
1457
- getTimes(): number[];
1458
- /**
1459
- * Produce a `PerfReport` summarizing the recorded samples.
1460
- *
1461
- * @returns The summary report.
1462
- */
1463
- toReport(): PerfReport;
1464
- }
1465
-
1466
- interface DiffPoint {
1467
- time: number;
1468
- valueL: number;
1469
- valueR: number;
1470
- }
1471
- type DiffValidity = 'neither' | 'left-only' | 'right-only' | 'both';
1472
- interface DiffReport {
1473
- validity: DiffValidity;
1474
- minValue: number;
1475
- maxValue: number;
1476
- avgDiff: number;
1477
- minDiff: number;
1478
- maxDiff: number;
1479
- maxDiffPoint: DiffPoint;
1480
- }
1481
- declare function diffDatasets(datasetL: Dataset | undefined, datasetR: Dataset | undefined): DiffReport;
1482
-
1465
+ export declare class PerfStats {
1466
+ private readonly times;
1467
+ /**
1468
+ * Record a single run time sample.
1469
+ *
1470
+ * @param timeInMillis The run time in milliseconds.
1471
+ */
1472
+ addRun(timeInMillis: number): void;
1473
+ /**
1474
+ * Get the raw run time samples that have been recorded.
1475
+ *
1476
+ * @returns A copy of the recorded run times, in insertion order.
1477
+ */
1478
+ getTimes(): number[];
1479
+ /**
1480
+ * Produce a `PerfReport` summarizing the recorded samples.
1481
+ *
1482
+ * @returns The summary report.
1483
+ */
1484
+ toReport(): PerfReport;
1485
+ }
1486
+ //#endregion
1487
+ //#region src/comparison/diff-datasets/diff-datasets.d.ts
1488
+ export interface DiffPoint {
1489
+ time: number;
1490
+ valueL: number;
1491
+ valueR: number;
1492
+ }
1493
+ export type DiffValidity = 'neither' | 'left-only' | 'right-only' | 'both';
1494
+ export interface DiffReport {
1495
+ validity: DiffValidity;
1496
+ minValue: number;
1497
+ maxValue: number;
1498
+ avgDiff: number;
1499
+ minDiff: number;
1500
+ maxDiff: number;
1501
+ maxDiffPoint: DiffPoint;
1502
+ }
1503
+ export declare function diffDatasets(datasetL: Dataset | undefined, datasetR: Dataset | undefined): DiffReport;
1504
+ //#endregion
1505
+ //#region src/comparison/report/comparison-report-types.d.ts
1483
1506
  /**
1484
1507
  * The report for a single comparison test (involving a dataset produced under
1485
1508
  * a specific input scenario). This includes the full `DiffReport`, whereas
1486
1509
  * a `ComparisonTestSummary` only includes the `maxDiff` value.
1487
1510
  */
1488
- interface ComparisonTestReport {
1489
- /** The key of the scenario that was compared. */
1490
- scenarioKey: ComparisonScenarioKey;
1491
- /** The key of the dataset that was compared. */
1492
- datasetKey: DatasetKey;
1493
- /** The diff report for the comparison, or undefined if the test was skipped. */
1494
- diffReport?: DiffReport;
1495
- /**
1496
- * The diff report for the baseline scenario (all inputs at default), or undefined if this
1497
- * report is for the baseline scenario itself.
1498
- */
1499
- baselineDiffReport?: DiffReport;
1511
+ export interface ComparisonTestReport {
1512
+ /** The key of the scenario that was compared. */
1513
+ scenarioKey: ComparisonScenarioKey;
1514
+ /** The key of the dataset that was compared. */
1515
+ datasetKey: DatasetKey;
1516
+ /** The diff report for the comparison, or undefined if the test was skipped. */
1517
+ diffReport?: DiffReport;
1518
+ /**
1519
+ * The diff report for the baseline scenario (all inputs at default), or undefined if this
1520
+ * report is for the baseline scenario itself.
1521
+ */
1522
+ baselineDiffReport?: DiffReport;
1500
1523
  }
1501
1524
  /**
1502
1525
  * A simplified/terse version of `ComparisonTestReport` that is used when writing
@@ -1504,30 +1527,30 @@ interface ComparisonTestReport {
1504
1527
  * minimum set of fields (only the `maxDiff` value instead of the full `DiffReport`)
1505
1528
  * to keep the file smaller when there are many reported differences.
1506
1529
  */
1507
- interface ComparisonTestSummary {
1508
- /** Short for `scenarioKey`. */
1509
- s: ComparisonScenarioKey;
1510
- /** Short for `datasetKey`. */
1511
- d: DatasetKey;
1512
- /** Short for `maxDiff`. */
1513
- md?: number;
1514
- /** Short for `avgDiff`. */
1515
- ad?: number;
1516
- /** Short for `maxDiff` relative to baseline `maxDiff`. */
1517
- mdb?: number;
1518
- /** Short for `avgDiff` relative to baseline `avgDiff`. */
1519
- adb?: number;
1530
+ export interface ComparisonTestSummary {
1531
+ /** Short for `scenarioKey`. */
1532
+ s: ComparisonScenarioKey;
1533
+ /** Short for `datasetKey`. */
1534
+ d: DatasetKey;
1535
+ /** Short for `maxDiff`. */
1536
+ md?: number;
1537
+ /** Short for `avgDiff`. */
1538
+ ad?: number;
1539
+ /** Short for `maxDiff` relative to baseline `maxDiff`. */
1540
+ mdb?: number;
1541
+ /** Short for `avgDiff` relative to baseline `avgDiff`. */
1542
+ adb?: number;
1520
1543
  }
1521
1544
  /**
1522
1545
  * The roll-up report that contains the results of all individual comparison tests.
1523
1546
  */
1524
- interface ComparisonReport {
1525
- /** The set of all comparison test reports. */
1526
- testReports: ComparisonTestReport[];
1527
- /** The perf report for the "left" model. */
1528
- perfReportL: PerfReport;
1529
- /** The perf report for the "right" model. */
1530
- perfReportR: PerfReport;
1547
+ export interface ComparisonReport {
1548
+ /** The set of all comparison test reports. */
1549
+ testReports: ComparisonTestReport[];
1550
+ /** The perf report for the "left" model. */
1551
+ perfReportL: PerfReport;
1552
+ /** The perf report for the "right" model. */
1553
+ perfReportR: PerfReport;
1531
1554
  }
1532
1555
  /**
1533
1556
  * A simplified/terse version of `ComparisonReport` that only includes the minimum set
@@ -1535,417 +1558,423 @@ interface ComparisonReport {
1535
1558
  * reported differences). This only includes comparison results for which there is
1536
1559
  * a non-zero `maxDiff` value.
1537
1560
  */
1538
- interface ComparisonSummary {
1539
- /** The simplified set of all terse comparison test summaries. */
1540
- testSummaries: ComparisonTestSummary[];
1541
- /** The perf report for the "left" model. */
1542
- perfReportL: PerfReport;
1543
- /** The perf report for the "right" model. */
1544
- perfReportR: PerfReport;
1561
+ export interface ComparisonSummary {
1562
+ /** The simplified set of all terse comparison test summaries. */
1563
+ testSummaries: ComparisonTestSummary[];
1564
+ /** The perf report for the "left" model. */
1565
+ perfReportL: PerfReport;
1566
+ /** The perf report for the "right" model. */
1567
+ perfReportR: PerfReport;
1545
1568
  }
1546
-
1547
- type ComparisonGroupKind = 'by-dataset' | 'by-scenario';
1548
- type ComparisonGroupKey = string;
1569
+ //#endregion
1570
+ //#region src/comparison/report/comparison-group-types.d.ts
1571
+ export type ComparisonGroupKind = 'by-dataset' | 'by-scenario';
1572
+ export type ComparisonGroupKey = string;
1549
1573
  /**
1550
1574
  * A group of comparison test summaries associated with a particular scenario or dataset.
1551
1575
  */
1552
- interface ComparisonGroup {
1553
- /** The kind of group, either 'by-dataset' or 'by-scenario'. */
1554
- kind: ComparisonGroupKind;
1555
- /**
1556
- * The unique key for this group (a `DatasetKey` if grouped by dataset, or a
1557
- * `ComparisonScenarioKey` if grouped by scenario).
1558
- */
1559
- key: ComparisonGroupKey;
1560
- /** The comparison test summaries for this group. */
1561
- testSummaries: ComparisonTestSummary[];
1576
+ export interface ComparisonGroup {
1577
+ /** The kind of group, either 'by-dataset' or 'by-scenario'. */
1578
+ kind: ComparisonGroupKind;
1579
+ /**
1580
+ * The unique key for this group (a `DatasetKey` if grouped by dataset, or a
1581
+ * `ComparisonScenarioKey` if grouped by scenario).
1582
+ */
1583
+ key: ComparisonGroupKey;
1584
+ /** The comparison test summaries for this group. */
1585
+ testSummaries: ComparisonTestSummary[];
1562
1586
  }
1563
1587
  /** Describes the "root" or primary item for a group of comparisons. */
1564
- type ComparisonGroupRoot = ComparisonDataset | ComparisonScenario;
1588
+ export type ComparisonGroupRoot = ComparisonDataset | ComparisonScenario;
1565
1589
  /** A summary of scores for a group of comparisons. */
1566
- interface ComparisonGroupScores {
1567
- /** The total number of comparisons (sample size) for this group. */
1568
- totalDiffCount: number;
1569
- /** The sum of the diff values for the active sort mode (e.g., `maxDiff`, `avgDiff`) for each threshold bucket. */
1570
- totalDiffByBucket: number[];
1571
- /** The number of comparisons that fall into each threshold bucket. */
1572
- diffCountByBucket: number[];
1573
- /** The percentage of comparisons that fall into each threshold bucket. */
1574
- diffPercentByBucket: number[];
1590
+ export interface ComparisonGroupScores {
1591
+ /** The total number of comparisons (sample size) for this group. */
1592
+ totalDiffCount: number;
1593
+ /** The sum of the diff values for the active sort mode (e.g., `maxDiff`, `avgDiff`) for each threshold bucket. */
1594
+ totalDiffByBucket: number[];
1595
+ /** The number of comparisons that fall into each threshold bucket. */
1596
+ diffCountByBucket: number[];
1597
+ /** The percentage of comparisons that fall into each threshold bucket. */
1598
+ diffPercentByBucket: number[];
1575
1599
  }
1576
1600
  /**
1577
1601
  * A summary of a group of comparisons that includes the resolved scenario/dataset metadata
1578
1602
  * and score information for the group.
1579
1603
  */
1580
- interface ComparisonGroupSummary {
1581
- /** The metadata for the "root" or primary item for this group of comparisons. */
1582
- root: ComparisonGroupRoot;
1583
- /** The group containing the comparison summaries. */
1584
- group: ComparisonGroup;
1585
- /** The scores for this group, or undefined if comparisons were not performed for this group. */
1586
- scores?: ComparisonGroupScores;
1604
+ export interface ComparisonGroupSummary {
1605
+ /** The metadata for the "root" or primary item for this group of comparisons. */
1606
+ root: ComparisonGroupRoot;
1607
+ /** The group containing the comparison summaries. */
1608
+ group: ComparisonGroup;
1609
+ /** The scores for this group, or undefined if comparisons were not performed for this group. */
1610
+ scores?: ComparisonGroupScores;
1587
1611
  }
1588
1612
  /**
1589
1613
  * Breaks down a set of by-scenario or by-dataset groupings into distinct categories.
1590
1614
  */
1591
- interface ComparisonGroupSummariesByCategory {
1592
- /**
1593
- * All groups in a map, keyed by "group key" (either a dataset key or scenario key).
1594
- */
1595
- allGroupSummaries: Map<ComparisonGroupKey, ComparisonGroupSummary>;
1596
- /**
1597
- * Groups with items that have errors (are not valid) for both "left" and "right" models.
1598
- */
1599
- withErrors: ComparisonGroupSummary[];
1600
- /**
1601
- * Groups with items that are only valid for the "left" model (for example, datasets that
1602
- * were removed and no longer available in the "right" model).
1603
- */
1604
- onlyInLeft: ComparisonGroupSummary[];
1605
- /**
1606
- * Groups with items that are only valid for the "right" model (for example, scenarios
1607
- * for inputs that were added in the "right" model).
1608
- */
1609
- onlyInRight: ComparisonGroupSummary[];
1610
- /**
1611
- * Groups with one or more comparisons that have non-zero diff scores; the groups
1612
- * will be sorted by the diff score according to the active sort mode, with higher
1613
- * scores at the front of the array.
1614
- */
1615
- withDiffs: ComparisonGroupSummary[];
1616
- /**
1617
- * Groups where all comparisons have diff scores of zero (no differences between
1618
- * "left" and "right").
1619
- */
1620
- withoutDiffs: ComparisonGroupSummary[];
1615
+ export interface ComparisonGroupSummariesByCategory {
1616
+ /**
1617
+ * All groups in a map, keyed by "group key" (either a dataset key or scenario key).
1618
+ */
1619
+ allGroupSummaries: Map<ComparisonGroupKey, ComparisonGroupSummary>;
1620
+ /**
1621
+ * Groups with items that have errors (are not valid) for both "left" and "right" models.
1622
+ */
1623
+ withErrors: ComparisonGroupSummary[];
1624
+ /**
1625
+ * Groups with items that are only valid for the "left" model (for example, datasets that
1626
+ * were removed and no longer available in the "right" model).
1627
+ */
1628
+ onlyInLeft: ComparisonGroupSummary[];
1629
+ /**
1630
+ * Groups with items that are only valid for the "right" model (for example, scenarios
1631
+ * for inputs that were added in the "right" model).
1632
+ */
1633
+ onlyInRight: ComparisonGroupSummary[];
1634
+ /**
1635
+ * Groups with one or more comparisons that have non-zero diff scores; the groups
1636
+ * will be sorted by the diff score according to the active sort mode, with higher
1637
+ * scores at the front of the array.
1638
+ */
1639
+ withDiffs: ComparisonGroupSummary[];
1640
+ /**
1641
+ * Groups where all comparisons have diff scores of zero (no differences between
1642
+ * "left" and "right").
1643
+ */
1644
+ withoutDiffs: ComparisonGroupSummary[];
1621
1645
  }
1622
1646
  /**
1623
1647
  * Rolls up all by-scenario and by-dataset groupings.
1624
1648
  */
1625
- interface ComparisonCategorizedResults {
1626
- /** All summaries for the comparison tests that were performed. */
1627
- allTestSummaries: ComparisonTestSummary[];
1628
- /** The full set of by-scenario groupings. */
1629
- byScenario: ComparisonGroupSummariesByCategory;
1630
- /** The full set of by-dataset groupings. */
1631
- byDataset: ComparisonGroupSummariesByCategory;
1649
+ export interface ComparisonCategorizedResults {
1650
+ /** All summaries for the comparison tests that were performed. */
1651
+ allTestSummaries: ComparisonTestSummary[];
1652
+ /** The full set of by-scenario groupings. */
1653
+ byScenario: ComparisonGroupSummariesByCategory;
1654
+ /** The full set of by-dataset groupings. */
1655
+ byDataset: ComparisonGroupSummariesByCategory;
1632
1656
  }
1633
-
1657
+ //#endregion
1658
+ //#region src/comparison/config/comparison-datasets.d.ts
1634
1659
  /**
1635
1660
  * Provides access to the set of dataset definitions (`ComparisonDataset` instances) that are used
1636
1661
  * when comparing the two models.
1637
1662
  */
1638
1663
  interface ComparisonDatasets {
1639
- /**
1640
- * Return all `ComparisonDataset` instances that are available for comparisons.
1641
- */
1642
- getAllDatasets(): IterableIterator<ComparisonDataset>;
1643
- /**
1644
- * Return the dataset metadata for the given key.
1645
- *
1646
- * @param datasetKey The key for the dataset.
1647
- */
1648
- getDataset(datasetKey: DatasetKey): ComparisonDataset | undefined;
1649
- /**
1650
- * Return the keys for the datasets that should be compared for the given scenario.
1651
- *
1652
- * @param scenario The scenario definition.
1653
- */
1654
- getDatasetKeysForScenario(scenario: ComparisonScenario): DatasetKey[];
1655
- /**
1656
- * Return the reference plots that should be shown in the comparison graph for the
1657
- * given dataset and scenario.
1658
- *
1659
- * @param datasetKey The key for the dataset.
1660
- * @param scenario The scenario for which the dataset will be displayed.
1661
- */
1662
- getReferencePlotsForDataset(datasetKey: DatasetKey, scenario: ComparisonScenario): ComparisonPlot[];
1663
- /**
1664
- * Return the context graph IDs that should be shown for the given dataset and scenario.
1665
- *
1666
- * @param datasetKey The key for the dataset.
1667
- * @param scenario The scenario for which the dataset will be displayed.
1668
- */
1669
- getContextGraphIdsForDataset(datasetKey: DatasetKey, scenario: ComparisonScenario): BundleGraphId[];
1670
- }
1671
-
1664
+ /**
1665
+ * Return all `ComparisonDataset` instances that are available for comparisons.
1666
+ */
1667
+ getAllDatasets(): IterableIterator<ComparisonDataset>;
1668
+ /**
1669
+ * Return the dataset metadata for the given key.
1670
+ *
1671
+ * @param datasetKey The key for the dataset.
1672
+ */
1673
+ getDataset(datasetKey: DatasetKey): ComparisonDataset | undefined;
1674
+ /**
1675
+ * Return the keys for the datasets that should be compared for the given scenario.
1676
+ *
1677
+ * @param scenario The scenario definition.
1678
+ */
1679
+ getDatasetKeysForScenario(scenario: ComparisonScenario): DatasetKey[];
1680
+ /**
1681
+ * Return the reference plots that should be shown in the comparison graph for the
1682
+ * given dataset and scenario.
1683
+ *
1684
+ * @param datasetKey The key for the dataset.
1685
+ * @param scenario The scenario for which the dataset will be displayed.
1686
+ */
1687
+ getReferencePlotsForDataset(datasetKey: DatasetKey, scenario: ComparisonScenario): ComparisonPlot[];
1688
+ /**
1689
+ * Return the context graph IDs that should be shown for the given dataset and scenario.
1690
+ *
1691
+ * @param datasetKey The key for the dataset.
1692
+ * @param scenario The scenario for which the dataset will be displayed.
1693
+ */
1694
+ getContextGraphIdsForDataset(datasetKey: DatasetKey, scenario: ComparisonScenario): BundleGraphId[];
1695
+ }
1696
+ //#endregion
1697
+ //#region src/comparison/config/comparison-scenarios.d.ts
1672
1698
  interface ComparisonScenarios {
1673
- /**
1674
- * Return all `ComparisonScenario` instances that are available for comparisons.
1675
- */
1676
- getAllScenarios(): IterableIterator<ComparisonScenario>;
1677
- /**
1678
- * Return the scenario definition for the given key.
1679
- *
1680
- * @param key The key for the scenario.
1681
- */
1682
- getScenario(key: ComparisonScenarioKey): ComparisonScenario | undefined;
1683
- }
1684
-
1699
+ /**
1700
+ * Return all `ComparisonScenario` instances that are available for comparisons.
1701
+ */
1702
+ getAllScenarios(): IterableIterator<ComparisonScenario>;
1703
+ /**
1704
+ * Return the scenario definition for the given key.
1705
+ *
1706
+ * @param key The key for the scenario.
1707
+ */
1708
+ getScenario(key: ComparisonScenarioKey): ComparisonScenario | undefined;
1709
+ }
1710
+ //#endregion
1711
+ //#region src/comparison/config/comparison-config.d.ts
1685
1712
  /**
1686
1713
  * Describes an extra plot to be shown in a comparison graph.
1687
1714
  */
1688
1715
  interface ComparisonPlot {
1689
- /** The dataset key for the plot. */
1690
- datasetKey: DatasetKey;
1691
- /** The plot color. */
1692
- color: string;
1693
- /** The plot style. If undefined, defaults to 'normal'. */
1694
- style?: 'normal' | 'dashed';
1695
- /** The plot line width, in px units. If undefined, a default width will be used. */
1696
- lineWidth?: number;
1716
+ /** The dataset key for the plot. */
1717
+ datasetKey: DatasetKey;
1718
+ /** The plot color. */
1719
+ color: string;
1720
+ /** The plot style. If undefined, defaults to 'normal'. */
1721
+ style?: 'normal' | 'dashed';
1722
+ /** The plot line width, in px units. If undefined, a default width will be used. */
1723
+ lineWidth?: number;
1697
1724
  }
1698
1725
  interface ComparisonDatasetOptions {
1699
- /**
1700
- * The mapping of renamed dataset keys (old or "left" name as the map key,
1701
- * new or "right" name as the value).
1702
- */
1703
- renamedDatasetKeys?: Map<DatasetKey, DatasetKey>;
1704
- /**
1705
- * An optional function that allows for limiting the datasets that are compared
1706
- * for a given scenario. By default, all datasets are compared for a given
1707
- * scenario, but if a custom function is provided, it can return a subset of
1708
- * datasets (for example, to omit datasets that are not relevant).
1709
- */
1710
- datasetKeysForScenario?: (allDatasetKeys: DatasetKey[], scenario: ComparisonScenario) => DatasetKey[];
1711
- /**
1712
- * An optional function that allows for including additional reference plots
1713
- * on a comparison graph for a given dataset and scenario. By default, no
1714
- * additional reference plots are included, but if a custom function is
1715
- * provided, it can return an array of `ComparisonPlot` objects.
1716
- */
1717
- referencePlotsForDataset?: (dataset: ComparisonDataset, scenario: ComparisonScenario) => ComparisonPlot[];
1718
- /**
1719
- * An optional function that allows for customizing the set of context graphs
1720
- * that are shown for a given dataset and scenario. By default, all graphs in
1721
- * which the dataset appears will be shown, but if a custom function is provided,
1722
- * it can return a different set of graphs (for example, to omit graphs that are
1723
- * not relevant under the given scenario).
1724
- */
1725
- contextGraphIdsForDataset?: (dataset: ComparisonDataset, scenario: ComparisonScenario) => BundleGraphId[];
1726
+ /**
1727
+ * The mapping of renamed dataset keys (old or "left" name as the map key,
1728
+ * new or "right" name as the value).
1729
+ */
1730
+ renamedDatasetKeys?: Map<DatasetKey, DatasetKey>;
1731
+ /**
1732
+ * An optional function that allows for limiting the datasets that are compared
1733
+ * for a given scenario. By default, all datasets are compared for a given
1734
+ * scenario, but if a custom function is provided, it can return a subset of
1735
+ * datasets (for example, to omit datasets that are not relevant).
1736
+ */
1737
+ datasetKeysForScenario?: (allDatasetKeys: DatasetKey[], scenario: ComparisonScenario) => DatasetKey[];
1738
+ /**
1739
+ * An optional function that allows for including additional reference plots
1740
+ * on a comparison graph for a given dataset and scenario. By default, no
1741
+ * additional reference plots are included, but if a custom function is
1742
+ * provided, it can return an array of `ComparisonPlot` objects.
1743
+ */
1744
+ referencePlotsForDataset?: (dataset: ComparisonDataset, scenario: ComparisonScenario) => ComparisonPlot[];
1745
+ /**
1746
+ * An optional function that allows for customizing the set of context graphs
1747
+ * that are shown for a given dataset and scenario. By default, all graphs in
1748
+ * which the dataset appears will be shown, but if a custom function is provided,
1749
+ * it can return a different set of graphs (for example, to omit graphs that are
1750
+ * not relevant under the given scenario).
1751
+ */
1752
+ contextGraphIdsForDataset?: (dataset: ComparisonDataset, scenario: ComparisonScenario) => BundleGraphId[];
1726
1753
  }
1727
1754
  /**
1728
1755
  * Describes a row in the comparison report summary view.
1729
1756
  */
1730
1757
  interface ComparisonReportSummaryRow {
1731
- /** The group summary represented by the row. */
1732
- groupSummary: ComparisonGroupSummary;
1733
- /** The custom title for the row (this overrides the default title derived from the summary). */
1734
- title?: string;
1735
- /** The custom subtitle for the row (this overrides the default subtitle derived from the summary). */
1736
- subtitle?: string;
1758
+ /** The group summary represented by the row. */
1759
+ groupSummary: ComparisonGroupSummary;
1760
+ /** The custom title for the row (this overrides the default title derived from the summary). */
1761
+ title?: string;
1762
+ /** The custom subtitle for the row (this overrides the default subtitle derived from the summary). */
1763
+ subtitle?: string;
1737
1764
  }
1738
1765
  /**
1739
1766
  * Describes a section in the comparison report summary view.
1740
1767
  */
1741
1768
  interface ComparisonReportSummarySection {
1742
- /** The text to display for the section header. */
1743
- headerText: string;
1744
- /** The summary rows to display in the section. */
1745
- rows: ComparisonReportSummaryRow[];
1746
- /**
1747
- * The initial expanded state of the section. If undefined, defaults to 'expanded-if-diffs',
1748
- * meaning the section will be initially expanded only if any rows have differences, otherwise
1749
- * it will be initially collapsed.
1750
- */
1751
- initialState?: 'collapsed' | 'expanded' | 'expanded-if-diffs';
1752
- /**
1753
- * Whether the items in the section are stable, i.e., not changing from run to run. If
1754
- * undefined, defaults to false. This can be used to group items in the filter panel.
1755
- * Set it to true if the group contains a stable set of rows where the order does not
1756
- * change between runs. Set it to false (or leave it undefined) if the group contains
1757
- * rows that have a different order between runs (for example, "Scenarios producing
1758
- * differences").
1759
- */
1760
- stable?: boolean;
1769
+ /** The text to display for the section header. */
1770
+ headerText: string;
1771
+ /** The summary rows to display in the section. */
1772
+ rows: ComparisonReportSummaryRow[];
1773
+ /**
1774
+ * The initial expanded state of the section. If undefined, defaults to 'expanded-if-diffs',
1775
+ * meaning the section will be initially expanded only if any rows have differences, otherwise
1776
+ * it will be initially collapsed.
1777
+ */
1778
+ initialState?: 'collapsed' | 'expanded' | 'expanded-if-diffs';
1779
+ /**
1780
+ * Whether the items in the section are stable, i.e., not changing from run to run. If
1781
+ * undefined, defaults to false. This can be used to group items in the filter panel.
1782
+ * Set it to true if the group contains a stable set of rows where the order does not
1783
+ * change between runs. Set it to false (or leave it undefined) if the group contains
1784
+ * rows that have a different order between runs (for example, "Scenarios producing
1785
+ * differences").
1786
+ */
1787
+ stable?: boolean;
1761
1788
  }
1762
1789
  /**
1763
1790
  * Describes an item (box) in the comparison report detail view.
1764
1791
  */
1765
1792
  interface ComparisonReportDetailItem {
1766
- /** The title of the item. */
1767
- title: string;
1768
- /** The subtitle of the item (if any). */
1769
- subtitle?: string;
1770
- /** The scenario for the item. */
1771
- scenario: ComparisonScenario;
1772
- /** The test summary for the item. */
1773
- testSummary: ComparisonTestSummary;
1793
+ /** The title of the item. */
1794
+ title: string;
1795
+ /** The subtitle of the item (if any). */
1796
+ subtitle?: string;
1797
+ /** The scenario for the item. */
1798
+ scenario: ComparisonScenario;
1799
+ /** The test summary for the item. */
1800
+ testSummary: ComparisonTestSummary;
1774
1801
  }
1775
1802
  /**
1776
1803
  * Describes a row in the comparison report detail view.
1777
1804
  */
1778
1805
  interface ComparisonReportDetailRow {
1779
- /** The title of the row. */
1780
- title: string;
1781
- /** The subtitle of the row (if any). */
1782
- subtitle?: string;
1783
- /** The score for the row (the meaning of the value depends on the chosen statistical method). */
1784
- score: number;
1785
- /** The items in this row (one item per box). */
1786
- items: ComparisonReportDetailItem[];
1806
+ /** The title of the row. */
1807
+ title: string;
1808
+ /** The subtitle of the row (if any). */
1809
+ subtitle?: string;
1810
+ /** The score for the row (the meaning of the value depends on the chosen statistical method). */
1811
+ score: number;
1812
+ /** The items in this row (one item per box). */
1813
+ items: ComparisonReportDetailItem[];
1787
1814
  }
1788
1815
  interface ComparisonReportOptions {
1789
- /**
1790
- * An optional function that allows for customizing the order and grouping of
1791
- * sections and rows in the "comparisons by scenario" summary view.
1792
- *
1793
- * @param summaries The comparison summaries, one summary per scenario.
1794
- * @returns The sections to display in the "comparisons by scenario" summary view.
1795
- */
1796
- summarySectionsForComparisonsByScenario?: (summaries: ComparisonGroupSummariesByCategory) => ComparisonReportSummarySection[];
1797
- /**
1798
- * An optional function that allows for customizing the order and grouping of
1799
- * sections and rows in the "comparisons by dataset" summary view.
1800
- *
1801
- * @param summaries The comparison summaries, one summary per dataset.
1802
- * @returns The sections to display in the "comparisons by dataset" summary view.
1803
- */
1804
- summarySectionsForComparisonsByDataset?: (summaries: ComparisonGroupSummariesByCategory) => ComparisonReportSummarySection[];
1805
- /**
1806
- * An optional function that allows for customizing the order of rows and boxes
1807
- * in the detail view for a scenario.
1808
- *
1809
- * @param rows The original rows to be displayed in the detail view for a scenario.
1810
- * @returns The customized rows to display in the detail view for a scenario.
1811
- */
1812
- detailRowsForScenario?: (rows: ComparisonReportDetailRow[]) => ComparisonReportDetailRow[];
1813
- /**
1814
- * An optional function that allows for customizing the order of rows and boxes
1815
- * in the detail view for a dataset.
1816
- *
1817
- * @param rows The original rows to be displayed in the detail view for a dataset.
1818
- * @returns The customized rows to display in the detail view for a dataset.
1819
- */
1820
- detailRowsForDataset?: (rows: ComparisonReportDetailRow[]) => ComparisonReportDetailRow[];
1816
+ /**
1817
+ * An optional function that allows for customizing the order and grouping of
1818
+ * sections and rows in the "comparisons by scenario" summary view.
1819
+ *
1820
+ * @param summaries The comparison summaries, one summary per scenario.
1821
+ * @returns The sections to display in the "comparisons by scenario" summary view.
1822
+ */
1823
+ summarySectionsForComparisonsByScenario?: (summaries: ComparisonGroupSummariesByCategory) => ComparisonReportSummarySection[];
1824
+ /**
1825
+ * An optional function that allows for customizing the order and grouping of
1826
+ * sections and rows in the "comparisons by dataset" summary view.
1827
+ *
1828
+ * @param summaries The comparison summaries, one summary per dataset.
1829
+ * @returns The sections to display in the "comparisons by dataset" summary view.
1830
+ */
1831
+ summarySectionsForComparisonsByDataset?: (summaries: ComparisonGroupSummariesByCategory) => ComparisonReportSummarySection[];
1832
+ /**
1833
+ * An optional function that allows for customizing the order of rows and boxes
1834
+ * in the detail view for a scenario.
1835
+ *
1836
+ * @param rows The original rows to be displayed in the detail view for a scenario.
1837
+ * @returns The customized rows to display in the detail view for a scenario.
1838
+ */
1839
+ detailRowsForScenario?: (rows: ComparisonReportDetailRow[]) => ComparisonReportDetailRow[];
1840
+ /**
1841
+ * An optional function that allows for customizing the order of rows and boxes
1842
+ * in the detail view for a dataset.
1843
+ *
1844
+ * @param rows The original rows to be displayed in the detail view for a dataset.
1845
+ * @returns The customized rows to display in the detail view for a dataset.
1846
+ */
1847
+ detailRowsForDataset?: (rows: ComparisonReportDetailRow[]) => ComparisonReportDetailRow[];
1821
1848
  }
1822
1849
  interface ComparisonOptions {
1823
- /** The left-side ("baseline") bundle being compared. */
1824
- baseline: NamedBundle;
1825
- /**
1826
- * The array of thresholds used to color differences. Defaults to [1, 5, 10]
1827
- * which will use buckets of 0%, 0-1%, 1-5%, 5-10%, and >10%.
1828
- */
1829
- thresholds?: number[];
1830
- /**
1831
- * The array of ratio thresholds used to color differences when relative sorting is
1832
- * active. Defaults to [1, 2, 3] which will use buckets of 0, 0-1, 1-2, 2-3, and >3.
1833
- */
1834
- ratioThresholds?: number[];
1835
- /**
1836
- * The requested comparison scenario and view specifications. These can be
1837
- * specified in YAML or JSON files, or using `Spec` objects.
1838
- */
1839
- specs: (ComparisonSpecs | ComparisonSpecsSource)[];
1840
- /** Optional configuration for the datasets that are compared for different scenarios. */
1841
- datasets?: ComparisonDatasetOptions;
1842
- /** Options for customizing the comparison report. */
1843
- report?: ComparisonReportOptions;
1850
+ /** The left-side ("baseline") bundle being compared. */
1851
+ baseline: NamedBundle;
1852
+ /**
1853
+ * The array of thresholds used to color differences. Defaults to [1, 5, 10]
1854
+ * which will use buckets of 0%, 0-1%, 1-5%, 5-10%, and >10%.
1855
+ */
1856
+ thresholds?: number[];
1857
+ /**
1858
+ * The array of ratio thresholds used to color differences when relative sorting is
1859
+ * active. Defaults to [1, 2, 3] which will use buckets of 0, 0-1, 1-2, 2-3, and >3.
1860
+ */
1861
+ ratioThresholds?: number[];
1862
+ /**
1863
+ * The requested comparison scenario and view specifications. These can be
1864
+ * specified in YAML or JSON files, or using `Spec` objects.
1865
+ */
1866
+ specs: (ComparisonSpecs | ComparisonSpecsSource)[];
1867
+ /** Optional configuration for the datasets that are compared for different scenarios. */
1868
+ datasets?: ComparisonDatasetOptions;
1869
+ /** Options for customizing the comparison report. */
1870
+ report?: ComparisonReportOptions;
1844
1871
  }
1845
1872
  interface ComparisonConfig {
1846
- /** The loaded left-side ("baseline") bundle being compared. */
1847
- bundleL: LoadedBundle;
1848
- /** The loaded right-side ("current") bundle being compared. */
1849
- bundleR: LoadedBundle;
1850
- /**
1851
- * The array of thresholds used to color differences. For example, [1, 5, 10] will use
1852
- * buckets of 0%, 0-1%, 1-5%, 5-10%, and >10%.
1853
- */
1854
- thresholds: number[];
1855
- /**
1856
- * The array of ratio thresholds used to color differences when relative sorting is
1857
- * active. For example, [1, 2, 3] will use buckets of 0, 0-1, 1-2, 2-3, and >3.
1858
- */
1859
- ratioThresholds: number[];
1860
- /** The set of resolved scenarios that will be compared. */
1861
- scenarios: ComparisonScenarios;
1862
- /** The set of resolved datasets that will be compared. */
1863
- datasets: ComparisonDatasets;
1864
- /** The set of resolved view groups. */
1865
- viewGroups: ComparisonViewGroup[];
1866
- /** Options for customizing the comparison report. */
1867
- reportOptions?: ComparisonReportOptions;
1868
- }
1869
-
1873
+ /** The loaded left-side ("baseline") bundle being compared. */
1874
+ bundleL: LoadedBundle;
1875
+ /** The loaded right-side ("current") bundle being compared. */
1876
+ bundleR: LoadedBundle;
1877
+ /**
1878
+ * The array of thresholds used to color differences. For example, [1, 5, 10] will use
1879
+ * buckets of 0%, 0-1%, 1-5%, 5-10%, and >10%.
1880
+ */
1881
+ thresholds: number[];
1882
+ /**
1883
+ * The array of ratio thresholds used to color differences when relative sorting is
1884
+ * active. For example, [1, 2, 3] will use buckets of 0, 0-1, 1-2, 2-3, and >3.
1885
+ */
1886
+ ratioThresholds: number[];
1887
+ /** The set of resolved scenarios that will be compared. */
1888
+ scenarios: ComparisonScenarios;
1889
+ /** The set of resolved datasets that will be compared. */
1890
+ datasets: ComparisonDatasets;
1891
+ /** The set of resolved view groups. */
1892
+ viewGroups: ComparisonViewGroup[];
1893
+ /** Options for customizing the comparison report. */
1894
+ reportOptions?: ComparisonReportOptions;
1895
+ }
1896
+ //#endregion
1897
+ //#region src/comparison/run/comparison-data-coordinator.d.ts
1870
1898
  type ComparisonDataRequestKey = string;
1871
1899
  /**
1872
1900
  * Options for `requestDatasetMaps`.
1873
1901
  */
1874
1902
  interface RequestDatasetMapsOptions {
1875
- /** Optional constant overrides for the "left" model. */
1876
- constantsL?: ConstantOverride[];
1877
- /** Optional constant overrides for the "right" model. */
1878
- constantsR?: ConstantOverride[];
1879
- /** Optional lookup overrides for the "left" model. */
1880
- lookupsL?: LookupOverride[];
1881
- /** Optional lookup overrides for the "right" model. */
1882
- lookupsR?: LookupOverride[];
1903
+ /** Optional constant overrides for the "left" model. */
1904
+ constantsL?: ConstantOverride[];
1905
+ /** Optional constant overrides for the "right" model. */
1906
+ constantsR?: ConstantOverride[];
1907
+ /** Optional lookup overrides for the "left" model. */
1908
+ lookupsL?: LookupOverride[];
1909
+ /** Optional lookup overrides for the "right" model. */
1910
+ lookupsR?: LookupOverride[];
1883
1911
  }
1884
1912
  /**
1885
1913
  * Coordinates loading of data in parallel from two models.
1886
1914
  */
1887
- declare class ComparisonDataCoordinator {
1888
- private readonly taskQueue;
1889
- constructor(taskQueue: TaskQueue);
1890
- /**
1891
- * Request datasets from the two models.
1892
- *
1893
- * @param requestKey The unique key for the request.
1894
- * @param sourceL The source of the first ("left") dataset. If "left", the datasets will
1895
- * be fetched from the "left" bundle's model, otherwise they will be fetched from the
1896
- * "right" bundle's model.
1897
- * @param scenarioSpecL The scenario used for the first ("left") model of the comparison.
1898
- * @param sourceR The source of the second ("right") dataset. If "left", the datasets
1899
- * will be fetched from the "left" bundle's model, otherwise they will be fetched from
1900
- * the "right" bundle's model.
1901
- * @param scenarioSpecR The scenario used for the second ("right") model of the comparison.
1902
- * @param datasetKeys The keys of the datasets to be fetched.
1903
- * @param options Optional configuration including constant and lookup overrides.
1904
- * @param onResponse The callback that will be called with the dataset maps.
1905
- */
1906
- requestDatasetMaps(requestKey: ComparisonDataRequestKey, sourceL: 'left' | 'right', scenarioSpecL: ScenarioSpec, sourceR: 'left' | 'right', scenarioSpecR: ScenarioSpec, datasetKeys: DatasetKey[], options: RequestDatasetMapsOptions | undefined, onResponse: (datasetMapL?: DatasetMap, datasetMapR?: DatasetMap) => void): void;
1907
- /**
1908
- * Request graph data from the two models.
1909
- *
1910
- * @param requestKey The unique key for the request.
1911
- * @param sourceL The source of the first ("left") dataset. If "left", the datasets will
1912
- * be fetched from the "left" bundle's model, otherwise they will be fetched from the
1913
- * "right" bundle's model.
1914
- * @param scenarioSpecL The scenario used for the first ("left") model of the comparison.
1915
- * @param sourceR The source of the second ("right") dataset. If "left", the datasets
1916
- * will be fetched from the "left" bundle's model, otherwise they will be fetched from
1917
- * the "right" bundle's model.
1918
- * @param scenarioSpecR The scenario used for the second ("right") model of the comparison.
1919
- * @param graphId The ID of the graph for which data will be fetched.
1920
- * @param onResponse The callback that will be called with the graph data.
1921
- */
1922
- requestGraphData(requestKey: ComparisonDataRequestKey, sourceL: 'left' | 'right', scenarioSpecL: ScenarioSpec, sourceR: 'left' | 'right', scenarioSpecR: ScenarioSpec, graphId: BundleGraphId, onResponse: (graphDataL?: BundleGraphData, graphDataR?: BundleGraphData) => void): void;
1923
- cancelRequest(key: ComparisonDataRequestKey): void;
1924
- }
1925
- declare function createComparisonDataCoordinator(): ComparisonDataCoordinator;
1926
-
1927
- type GraphInclusion = 'neither' | 'left-only' | 'right-only' | 'both';
1928
- interface GraphComparisonMetadataReport {
1929
- /** The key for the metadata field. */
1930
- key: string;
1931
- /** The value of the metadata field in the left bundle. */
1932
- valueL?: string;
1933
- /** The value of the metadata field in the right bundle. */
1934
- valueR?: string;
1935
- }
1936
- interface GraphComparisonDatasetReport {
1937
- /** The dataset key. */
1938
- datasetKey: DatasetKey;
1939
- /** The max diff for this dataset. */
1940
- maxDiff?: number;
1941
- }
1942
- interface GraphComparisonReport {
1943
- /** Indicates which bundles the graph is defined in. */
1944
- inclusion: GraphInclusion;
1945
- /** The metadata fields with differences. */
1946
- metadataReports: GraphComparisonMetadataReport[];
1947
- /** The datasets with differences. */
1948
- datasetReports: GraphComparisonDatasetReport[];
1915
+ export declare class ComparisonDataCoordinator {
1916
+ private readonly taskQueue;
1917
+ constructor(taskQueue: TaskQueue);
1918
+ /**
1919
+ * Request datasets from the two models.
1920
+ *
1921
+ * @param requestKey The unique key for the request.
1922
+ * @param sourceL The source of the first ("left") dataset. If "left", the datasets will
1923
+ * be fetched from the "left" bundle's model, otherwise they will be fetched from the
1924
+ * "right" bundle's model.
1925
+ * @param scenarioSpecL The scenario used for the first ("left") model of the comparison.
1926
+ * @param sourceR The source of the second ("right") dataset. If "left", the datasets
1927
+ * will be fetched from the "left" bundle's model, otherwise they will be fetched from
1928
+ * the "right" bundle's model.
1929
+ * @param scenarioSpecR The scenario used for the second ("right") model of the comparison.
1930
+ * @param datasetKeys The keys of the datasets to be fetched.
1931
+ * @param options Optional configuration including constant and lookup overrides.
1932
+ * @param onResponse The callback that will be called with the dataset maps.
1933
+ */
1934
+ requestDatasetMaps(requestKey: ComparisonDataRequestKey, sourceL: 'left' | 'right', scenarioSpecL: ScenarioSpec, sourceR: 'left' | 'right', scenarioSpecR: ScenarioSpec, datasetKeys: DatasetKey[], options: RequestDatasetMapsOptions | undefined, onResponse: (datasetMapL?: DatasetMap, datasetMapR?: DatasetMap) => void): void;
1935
+ /**
1936
+ * Request graph data from the two models.
1937
+ *
1938
+ * @param requestKey The unique key for the request.
1939
+ * @param sourceL The source of the first ("left") dataset. If "left", the datasets will
1940
+ * be fetched from the "left" bundle's model, otherwise they will be fetched from the
1941
+ * "right" bundle's model.
1942
+ * @param scenarioSpecL The scenario used for the first ("left") model of the comparison.
1943
+ * @param sourceR The source of the second ("right") dataset. If "left", the datasets
1944
+ * will be fetched from the "left" bundle's model, otherwise they will be fetched from
1945
+ * the "right" bundle's model.
1946
+ * @param scenarioSpecR The scenario used for the second ("right") model of the comparison.
1947
+ * @param graphId The ID of the graph for which data will be fetched.
1948
+ * @param onResponse The callback that will be called with the graph data.
1949
+ */
1950
+ requestGraphData(requestKey: ComparisonDataRequestKey, sourceL: 'left' | 'right', scenarioSpecL: ScenarioSpec, sourceR: 'left' | 'right', scenarioSpecR: ScenarioSpec, graphId: BundleGraphId, onResponse: (graphDataL?: BundleGraphData, graphDataR?: BundleGraphData) => void): void;
1951
+ cancelRequest(key: ComparisonDataRequestKey): void;
1952
+ }
1953
+ export declare function createComparisonDataCoordinator(): ComparisonDataCoordinator;
1954
+ //#endregion
1955
+ //#region src/comparison/diff-graphs/diff-graphs.d.ts
1956
+ export type GraphInclusion = 'neither' | 'left-only' | 'right-only' | 'both';
1957
+ export interface GraphComparisonMetadataReport {
1958
+ /** The key for the metadata field. */
1959
+ key: string;
1960
+ /** The value of the metadata field in the left bundle. */
1961
+ valueL?: string;
1962
+ /** The value of the metadata field in the right bundle. */
1963
+ valueR?: string;
1964
+ }
1965
+ export interface GraphComparisonDatasetReport {
1966
+ /** The dataset key. */
1967
+ datasetKey: DatasetKey;
1968
+ /** The max diff for this dataset. */
1969
+ maxDiff?: number;
1970
+ }
1971
+ export interface GraphComparisonReport {
1972
+ /** Indicates which bundles the graph is defined in. */
1973
+ inclusion: GraphInclusion;
1974
+ /** The metadata fields with differences. */
1975
+ metadataReports: GraphComparisonMetadataReport[];
1976
+ /** The datasets with differences. */
1977
+ datasetReports: GraphComparisonDatasetReport[];
1949
1978
  }
1950
1979
  /**
1951
1980
  * Comparison the metadata and datasets for the given graphs.
@@ -1955,8 +1984,9 @@ interface GraphComparisonReport {
1955
1984
  * @param scenarioKey The key of the scenario used for comparing datasets.
1956
1985
  * @param testSummaries The set of test summaries from a previous comparison run.
1957
1986
  */
1958
- declare function diffGraphs(graphL: BundleGraphSpec | undefined, graphR: BundleGraphSpec | undefined, scenarioKey: ComparisonScenarioKey, testSummaries: ComparisonTestSummary[]): GraphComparisonReport;
1959
-
1987
+ export declare function diffGraphs(graphL: BundleGraphSpec | undefined, graphR: BundleGraphSpec | undefined, scenarioKey: ComparisonScenarioKey, testSummaries: ComparisonTestSummary[]): GraphComparisonReport;
1988
+ //#endregion
1989
+ //#region src/comparison/report/comparison-reporting.d.ts
1960
1990
  /**
1961
1991
  * Convert a full `ComparisonReport` to a simplified `ComparisonSummary` that includes
1962
1992
  * the minimum set of fields needed to keep the file smaller when there are many
@@ -1966,7 +1996,7 @@ declare function diffGraphs(graphL: BundleGraphSpec | undefined, graphR: BundleG
1966
1996
  * @param comparisonReport The full comparison report.
1967
1997
  * @return The terse summary.
1968
1998
  */
1969
- declare function comparisonSummaryFromReport(comparisonReport: ComparisonReport): ComparisonSummary;
1999
+ export declare function comparisonSummaryFromReport(comparisonReport: ComparisonReport): ComparisonSummary;
1970
2000
  /**
1971
2001
  * Convert a full `ComparisonTestReport` to a terse `ComparisonTestSummary`. This will
1972
2002
  * return undefined if the test has a zero `maxDiff` value.
@@ -1976,11 +2006,13 @@ declare function comparisonSummaryFromReport(comparisonReport: ComparisonReport)
1976
2006
  * @param baselineAvgDiff The avg diff for the baseline scenario, or undefined if not available.
1977
2007
  * @return The terse comparison test summary.
1978
2008
  */
1979
- declare function testSummaryFromReport(r: ComparisonTestReport, baselineMaxDiff: number | undefined, baselineAvgDiff: number | undefined): ComparisonTestSummary | undefined;
1980
-
2009
+ export declare function testSummaryFromReport(r: ComparisonTestReport, baselineMaxDiff: number | undefined, baselineAvgDiff: number | undefined): ComparisonTestSummary | undefined;
2010
+ //#endregion
2011
+ //#region src/comparison/report/comparison-sort-mode.d.ts
1981
2012
  /** The available sort modes for categorizing comparison groups. */
1982
2013
  type ComparisonSortMode = 'max-diff' | 'avg-diff' | 'max-diff-relative' | 'avg-diff-relative';
1983
-
2014
+ //#endregion
2015
+ //#region src/comparison/report/comparison-group-scores.d.ts
1984
2016
  /**
1985
2017
  * Compute the overall scores for the given group of comparison test summaries.
1986
2018
  *
@@ -1989,8 +2021,9 @@ type ComparisonSortMode = 'max-diff' | 'avg-diff' | 'max-diff-relative' | 'avg-d
1989
2021
  * the scores will be summarized.
1990
2022
  * @param sortMode The sort mode to determine which field to use for scoring.
1991
2023
  */
1992
- declare function getScoresForTestSummaries(testSummaries: ComparisonTestSummary[], thresholds: number[], sortMode: ComparisonSortMode): ComparisonGroupScores;
1993
-
2024
+ export declare function getScoresForTestSummaries(testSummaries: ComparisonTestSummary[], thresholds: number[], sortMode: ComparisonSortMode): ComparisonGroupScores;
2025
+ //#endregion
2026
+ //#region src/comparison/report/comparison-grouping.d.ts
1994
2027
  /**
1995
2028
  * Given a set of terse test summaries (which only includes summaries for tests with non-zero `maxDiff`
1996
2029
  * scores), restore the full set of summaries and then categorize them.
@@ -1999,74 +2032,77 @@ declare function getScoresForTestSummaries(testSummaries: ComparisonTestSummary[
1999
2032
  * @param terseSummaries The set of terse test summaries.
2000
2033
  * @param sortMode The sort mode to determine which field to use for scoring.
2001
2034
  */
2002
- declare function categorizeComparisonTestSummaries(comparisonConfig: ComparisonConfig, terseSummaries: ComparisonTestSummary[], sortMode: ComparisonSortMode): ComparisonCategorizedResults;
2003
-
2035
+ export declare function categorizeComparisonTestSummaries(comparisonConfig: ComparisonConfig, terseSummaries: ComparisonTestSummary[], sortMode: ComparisonSortMode): ComparisonCategorizedResults;
2036
+ //#endregion
2037
+ //#region src/config/config-types.d.ts
2004
2038
  /**
2005
2039
  * Additional options that are passed to `getConfigOptions`.
2006
2040
  */
2007
2041
  interface ConfigInitOptions {
2008
- /** If defined, overrides the displayed name of the baseline ("left") bundle. */
2009
- bundleNameL?: string;
2010
- /** If defined, overrides the displayed name of the current ("right") bundle. */
2011
- bundleNameR?: string;
2042
+ /** If defined, overrides the displayed name of the baseline ("left") bundle. */
2043
+ bundleNameL?: string;
2044
+ /** If defined, overrides the displayed name of the current ("right") bundle. */
2045
+ bundleNameR?: string;
2012
2046
  }
2013
2047
  /**
2014
2048
  * The user-specified options used by the library to resolve and initialize a `Config` instance.
2015
2049
  */
2016
2050
  interface ConfigOptions {
2017
- /**
2018
- * The bundle being checked. This bundle will also be compared against the
2019
- * "baseline" bundle, if `comparison` options are defined.
2020
- */
2021
- current: NamedBundle;
2022
- /**
2023
- * The model check options.
2024
- */
2025
- check: CheckOptions;
2026
- /**
2027
- * The model comparison options.
2028
- */
2029
- comparison?: ComparisonOptions;
2030
- /**
2031
- * The number of model instances to initialize for each bundle.
2032
- *
2033
- * If undefined, the default behavior will be used, which is to initialize a single
2034
- * model instance for each bundle.
2035
- *
2036
- * If you set this to a value greater than 1, it will allow multiple pairs of model
2037
- * instances to be run concurrently. For example, if the number of CPU cores is 8,
2038
- * setting this to 4 will allow 4 pairs of model instances to be run concurrently,
2039
- * using all available cores.
2040
- *
2041
- * If you set this to 0, the implementation will automatically choose a value based on
2042
- * the number of available CPU cores (i.e., the number of cores divided by 2).
2043
- */
2044
- concurrency?: number;
2051
+ /**
2052
+ * The bundle being checked. This bundle will also be compared against the
2053
+ * "baseline" bundle, if `comparison` options are defined.
2054
+ */
2055
+ current: NamedBundle;
2056
+ /**
2057
+ * The model check options.
2058
+ */
2059
+ check: CheckOptions;
2060
+ /**
2061
+ * The model comparison options.
2062
+ */
2063
+ comparison?: ComparisonOptions;
2064
+ /**
2065
+ * The number of model instances to initialize for each bundle.
2066
+ *
2067
+ * If undefined, the default behavior will be used, which is to initialize a single
2068
+ * model instance for each bundle.
2069
+ *
2070
+ * If you set this to a value greater than 1, it will allow multiple pairs of model
2071
+ * instances to be run concurrently. For example, if the number of CPU cores is 8,
2072
+ * setting this to 4 will allow 4 pairs of model instances to be run concurrently,
2073
+ * using all available cores.
2074
+ *
2075
+ * If you set this to 0, the implementation will automatically choose a value based on
2076
+ * the number of available CPU cores (i.e., the number of cores divided by 2).
2077
+ */
2078
+ concurrency?: number;
2045
2079
  }
2046
2080
  /**
2047
2081
  * The resolved configuration for check and comparison tests.
2048
2082
  */
2049
2083
  interface Config {
2050
- /** The resolved check test configuration. */
2051
- check: CheckConfig;
2052
- /** The resolved comparison test configuration. */
2053
- comparison?: ComparisonConfig;
2054
- }
2055
-
2056
- declare function createConfig(options: ConfigOptions): Promise<Config>;
2057
-
2084
+ /** The resolved check test configuration. */
2085
+ check: CheckConfig;
2086
+ /** The resolved comparison test configuration. */
2087
+ comparison?: ComparisonConfig;
2088
+ }
2089
+ //#endregion
2090
+ //#region src/config/config.d.ts
2091
+ export declare function createConfig(options: ConfigOptions): Promise<Config>;
2092
+ //#endregion
2093
+ //#region src/perf/perf-runner.d.ts
2058
2094
  type CancelRunPerf = () => void;
2059
2095
  interface RunPerfCallbacks {
2060
- onComplete?: (reportL: PerfReport, reportR: PerfReport) => void;
2061
- onError?: (error: Error) => void;
2096
+ onComplete?: (reportL: PerfReport, reportR: PerfReport) => void;
2097
+ onError?: (error: Error) => void;
2062
2098
  }
2063
2099
  interface RunPerfOptions {
2064
- /** The mode to run the performance tests (default is 'serial'). */
2065
- mode?: 'serial' | 'parallel';
2066
- /** The number of warmups for each perf run (default is 5). */
2067
- warmupCount?: number;
2068
- /** The number of times to run the model for each perf run (default is 100). */
2069
- runCount?: number;
2100
+ /** The mode to run the performance tests (default is 'serial'). */
2101
+ mode?: 'serial' | 'parallel';
2102
+ /** The number of warmups for each perf run (default is 5). */
2103
+ warmupCount?: number;
2104
+ /** The number of times to run the model for each perf run (default is 100). */
2105
+ runCount?: number;
2070
2106
  }
2071
2107
  /**
2072
2108
  * Run performance tests on the bundle models.
@@ -2075,8 +2111,9 @@ interface RunPerfOptions {
2075
2111
  * @param options The options for the performance run.
2076
2112
  * @return A function that will cancel the process when invoked.
2077
2113
  */
2078
- declare function runPerf(callbacks: RunPerfCallbacks, options?: RunPerfOptions): CancelRunPerf;
2079
-
2114
+ export declare function runPerf(callbacks: RunPerfCallbacks, options?: RunPerfOptions): CancelRunPerf;
2115
+ //#endregion
2116
+ //#region src/trace/trace-report.d.ts
2080
2117
  /**
2081
2118
  * The report for a single trace comparison between two datasets.
2082
2119
  *
@@ -2084,41 +2121,42 @@ declare function runPerf(callbacks: RunPerfCallbacks, options?: RunPerfOptions):
2084
2121
  * diff points. Maybe we can combine them and make the points array an opt-in thing.
2085
2122
  */
2086
2123
  interface TraceDatasetReport {
2087
- datasetKey: DatasetKey;
2088
- validity: DiffValidity;
2089
- points: Map<number, DiffPoint>;
2090
- minValue: number;
2091
- maxValue: number;
2092
- avgDiff: number;
2093
- minDiff: number;
2094
- maxDiff: number;
2095
- maxDiffPoint: DiffPoint;
2124
+ datasetKey: DatasetKey;
2125
+ validity: DiffValidity;
2126
+ points: Map<number, DiffPoint>;
2127
+ minValue: number;
2128
+ maxValue: number;
2129
+ avgDiff: number;
2130
+ minDiff: number;
2131
+ maxDiff: number;
2132
+ maxDiffPoint: DiffPoint;
2096
2133
  }
2097
2134
  /**
2098
2135
  * The roll-up report that contains the results of the trace comparisons
2099
2136
  * for all datasets.
2100
2137
  */
2101
2138
  interface TraceReport {
2102
- datasetReports: Map<DatasetKey, TraceDatasetReport>;
2139
+ datasetReports: Map<DatasetKey, TraceDatasetReport>;
2103
2140
  }
2104
-
2141
+ //#endregion
2142
+ //#region src/trace/trace-runner.d.ts
2105
2143
  type CancelRunTrace = () => void;
2106
2144
  interface RunTraceCallbacks {
2107
- onComplete?: (traceReport: TraceReport) => void;
2108
- onError?: (error: Error) => void;
2145
+ onComplete?: (traceReport: TraceReport) => void;
2146
+ onError?: (error: Error) => void;
2109
2147
  }
2110
2148
  interface TraceCompareToBundleOptions {
2111
- kind: 'compare-to-bundle';
2112
- bundleSide0: 'left' | 'right';
2113
- scenarioSpec0: ScenarioSpec;
2114
- bundleSide1: 'left' | 'right';
2115
- scenarioSpec1: ScenarioSpec;
2149
+ kind: 'compare-to-bundle';
2150
+ bundleSide0: 'left' | 'right';
2151
+ scenarioSpec0: ScenarioSpec;
2152
+ bundleSide1: 'left' | 'right';
2153
+ scenarioSpec1: ScenarioSpec;
2116
2154
  }
2117
2155
  interface TraceCompareToExtDataOptions {
2118
- kind: 'compare-to-ext-data';
2119
- extData: DatasetMap;
2120
- bundleSide: 'left' | 'right';
2121
- scenarioSpec: ScenarioSpec;
2156
+ kind: 'compare-to-ext-data';
2157
+ extData: DatasetMap;
2158
+ bundleSide: 'left' | 'right';
2159
+ scenarioSpec: ScenarioSpec;
2122
2160
  }
2123
2161
  type TraceOptions = TraceCompareToBundleOptions | TraceCompareToExtDataOptions;
2124
2162
  /**
@@ -2129,16 +2167,17 @@ type TraceOptions = TraceCompareToBundleOptions | TraceCompareToExtDataOptions;
2129
2167
  * @param options Options to control how the trace is run.
2130
2168
  * @return A function that will cancel the process when invoked.
2131
2169
  */
2132
- declare function runTrace(modelSpec: ModelSpec, callbacks: RunTraceCallbacks, options: TraceOptions): CancelRunTrace;
2133
-
2170
+ export declare function runTrace(modelSpec: ModelSpec, callbacks: RunTraceCallbacks, options: TraceOptions): CancelRunTrace;
2171
+ //#endregion
2172
+ //#region src/suite/suite-report-types.d.ts
2134
2173
  /**
2135
2174
  * The report for a single run of the full check+comparison test suite.
2136
2175
  */
2137
- interface SuiteReport {
2138
- /** The check report. */
2139
- checkReport: CheckReport;
2140
- /** The comparison report (only defined if comparisons were enabled). */
2141
- comparisonReport?: ComparisonReport;
2176
+ export interface SuiteReport {
2177
+ /** The check report. */
2178
+ checkReport: CheckReport;
2179
+ /** The comparison report (only defined if comparisons were enabled). */
2180
+ comparisonReport?: ComparisonReport;
2142
2181
  }
2143
2182
  /**
2144
2183
  * A simplified/terse version of `SuiteReport` that is used when writing
@@ -2147,34 +2186,35 @@ interface SuiteReport {
2147
2186
  * full `DiffReport` for each comparison test) to keep the file smaller
2148
2187
  * when there are many reported differences.
2149
2188
  */
2150
- interface SuiteSummary {
2151
- /** The date and time the suite was run (in ISO 8601 format, as generated by `Date.toISOString`). */
2152
- date: string;
2153
- /** The time in milliseconds that it took to run the suite. */
2154
- elapsed: number;
2155
- /** The check summary. */
2156
- checkSummary: CheckSummary;
2157
- /** The comparison summary (only defined if comparisons were enabled). */
2158
- comparisonSummary?: ComparisonSummary;
2159
- }
2160
-
2189
+ export interface SuiteSummary {
2190
+ /** The date and time the suite was run (in ISO 8601 format, as generated by `Date.toISOString`). */
2191
+ date: string;
2192
+ /** The time in milliseconds that it took to run the suite. */
2193
+ elapsed: number;
2194
+ /** The check summary. */
2195
+ checkSummary: CheckSummary;
2196
+ /** The comparison summary (only defined if comparisons were enabled). */
2197
+ comparisonSummary?: ComparisonSummary;
2198
+ }
2199
+ //#endregion
2200
+ //#region src/suite/suite-runner.d.ts
2161
2201
  type CancelRunSuite = () => void;
2162
2202
  interface RunSuiteCallbacks {
2163
- onProgress?: (pct: number) => void;
2164
- onComplete?: (suiteReport: SuiteReport) => void;
2165
- onError?: (error: Error) => void;
2203
+ onProgress?: (pct: number) => void;
2204
+ onComplete?: (suiteReport: SuiteReport) => void;
2205
+ onError?: (error: Error) => void;
2166
2206
  }
2167
2207
  interface RunSuiteOptions {
2168
- /**
2169
- * The check tests to skip. Note that checks are matched by group and name
2170
- * (case insensitive).
2171
- */
2172
- skipChecks?: CheckNameSpec[];
2173
- /**
2174
- * The comparison scenarios to skip. Note that scenarios are matched by
2175
- * title and subtitle (case insensitive).
2176
- */
2177
- skipComparisonScenarios?: ComparisonScenarioTitleSpec[];
2208
+ /**
2209
+ * The check tests to skip. Note that checks are matched by group and name
2210
+ * (case insensitive).
2211
+ */
2212
+ skipChecks?: CheckNameSpec[];
2213
+ /**
2214
+ * The comparison scenarios to skip. Note that scenarios are matched by
2215
+ * title and subtitle (case insensitive).
2216
+ */
2217
+ skipComparisonScenarios?: ComparisonScenarioTitleSpec[];
2178
2218
  }
2179
2219
  /**
2180
2220
  * Run the full suite of checks and comparisons defined in the given configuration.
@@ -2184,8 +2224,9 @@ interface RunSuiteOptions {
2184
2224
  * @param options Options to control how the tests are run.
2185
2225
  * @return A function that will cancel the process when invoked.
2186
2226
  */
2187
- declare function runSuite(config: Config, callbacks: RunSuiteCallbacks, options?: RunSuiteOptions): CancelRunSuite;
2188
-
2227
+ export declare function runSuite(config: Config, callbacks: RunSuiteCallbacks, options?: RunSuiteOptions): CancelRunSuite;
2228
+ //#endregion
2229
+ //#region src/suite/suite-reporting.d.ts
2189
2230
  /**
2190
2231
  * Convert a full `SuiteReport` to a simplified `SuiteSummary` that only includes
2191
2232
  * failed/errored checks or comparisons with differences.
@@ -2194,6 +2235,7 @@ declare function runSuite(config: Config, callbacks: RunSuiteCallbacks, options?
2194
2235
  * @param elapsedMillis The time in milliseconds that it took to run the suite.
2195
2236
  * @return The converted suite summary.
2196
2237
  */
2197
- declare function suiteSummaryFromReport(suiteReport: SuiteReport, elapsedMillis: number): SuiteSummary;
2198
-
2199
- export { type AllInputsSpec, type Bundle, type BundleGraphData, type BundleGraphDatasetSpec, type BundleGraphId, type BundleGraphSpec, type BundleGraphView, type BundleGraphViewOptions, type BundleModel, type CancelRunPerf, type CancelRunSuite, type CancelRunTrace as CancelTrace, type CheckConfig, CheckDataCoordinator, type CheckDataRef, type CheckDataRefKey, type CheckDataRefOp, type CheckDataRequestKey, type CheckDataset, type CheckDatasetError, type CheckDatasetReport, type CheckGroupReport, type CheckKey, type CheckNameSpec, type CheckOptions, type CheckPredicateOp, type CheckPredicateOpConstantRef, type CheckPredicateOpDataRef, type CheckPredicateOpRef, type CheckPredicateReport, type CheckPredicateSummary, type CheckPredicateTimeOptions, type CheckPredicateTimeRange, type CheckPredicateTimeSingle, type CheckPredicateTimeSpec, type CheckRefDataset, type CheckReport, type CheckResult, type CheckResultErrorInfo, type CheckScenario, type CheckScenarioError, type CheckScenarioInputDesc, type CheckScenarioReport, type CheckStatus, type CheckSummary, type CheckTestReport, type ComparisonCategorizedResults, type ComparisonConfig, ComparisonDataCoordinator, type ComparisonDataRequestKey, type ComparisonDataset, type ComparisonDatasetName, type ComparisonDatasetOptions, type ComparisonDatasetSource, type ComparisonDatasetSpec, type ComparisonDatasets, type ComparisonGraphGroup, type ComparisonGraphGroupId, type ComparisonGraphGroupRefSpec, type ComparisonGraphGroupSpec, type ComparisonGraphId, type ComparisonGraphsArraySpec, type ComparisonGraphsPresetSpec, type ComparisonGroup, type ComparisonGroupKey, type ComparisonGroupKind, type ComparisonGroupRoot, type ComparisonGroupScores, type ComparisonGroupSummariesByCategory, type ComparisonGroupSummary, type ComparisonOptions, type ComparisonPlot, type ComparisonReport, type ComparisonReportDetailItem, type ComparisonReportDetailRow, type ComparisonReportOptions, type ComparisonReportSummaryRow, type ComparisonReportSummarySection, type ComparisonResolverError, type ComparisonResolverUnknownInputError, type ComparisonResolverUnknownInputSettingGroupError, type ComparisonResolverValueOutOfRangeWarning, type ComparisonResolverWarning, type ComparisonScenario, type ComparisonScenarioAllInputsSettings, type ComparisonScenarioGroup, type ComparisonScenarioGroupId, type ComparisonScenarioGroupRefSpec, type ComparisonScenarioGroupSpec, type ComparisonScenarioGroupTitle, type ComparisonScenarioId, type ComparisonScenarioInput, type ComparisonScenarioInputAtPositionSpec, type ComparisonScenarioInputAtValueSpec, type ComparisonScenarioInputName, type ComparisonScenarioInputPosition, type ComparisonScenarioInputSettings, type ComparisonScenarioInputSpec, type ComparisonScenarioInputState, type ComparisonScenarioKey, type ComparisonScenarioPresetMatrixSpec, type ComparisonScenarioRefSpec, type ComparisonScenarioSettings, type ComparisonScenarioSpec, type ComparisonScenarioSubtitle, type ComparisonScenarioTitle, type ComparisonScenarioTitleSpec, type ComparisonScenarioWithAllInputsSpec, type ComparisonScenarioWithDistinctInputsSpec, type ComparisonScenarioWithInputsSpec, type ComparisonScenarioWithSettingGroupSpec, type ComparisonScenarios, type ComparisonSortMode, type ComparisonSpecs, type ComparisonSpecsSource, type ComparisonSummary, type ComparisonTestReport, type ComparisonTestSummary, type ComparisonUnresolvedScenarioGroupRef, type ComparisonUnresolvedScenarioRef, type ComparisonUnresolvedView, type ComparisonView, type ComparisonViewBox, type ComparisonViewBoxSpec, type ComparisonViewGraphOrder, type ComparisonViewGraphsSpec, type ComparisonViewGroup, type ComparisonViewGroupSpec, type ComparisonViewGroupTitle, type ComparisonViewGroupWithScenariosSpec, type ComparisonViewGroupWithViewsSpec, type ComparisonViewItemSubtitle, type ComparisonViewItemTitle, type ComparisonViewRow, type ComparisonViewRowSpec, type ComparisonViewRowSubtitle, type ComparisonViewRowTitle, type ComparisonViewSpec, type ComparisonViewSubtitle, type ComparisonViewTitle, type Config, type ConfigInitOptions, type ConfigOptions, type ConstantOverride, type DataSource, type Dataset, type DatasetGroupName, type DatasetKey, type DatasetMap, type DatasetsResult, type DiffPoint, type DiffReport, type DiffValidity, type EncodedImplVars, type EncodedSubscript, type EncodedVarInstance, type EncodedVarType, type EncodedVariable, type GetDatasetsOptions, type GraphComparisonDatasetReport, type GraphComparisonMetadataReport, type GraphComparisonReport, type GraphInclusion, type ImplVar, type ImplVarGroup, type InputAliasName, type InputGroupName, type InputId, type InputPosition, type InputSetting, type InputSettingGroupId, type InputSettingsSpec, type InputVar, type LegendItem, type LinkItem, type LoadedBundle, type LookupOverride, type ModelSpec, type NamedBundle, type OutputVar, type PerfReport, PerfStats, type PositionSetting, type RelatedItem, type RunPerfCallbacks, type RunPerfOptions, type RunSuiteCallbacks, type RunSuiteOptions, type ScenarioSpec, type ScenarioSpecUid, type SliderInputVar, type SourceName, type SuiteReport, type SuiteSummary, type SwitchInputVar, type RunTraceCallbacks as TraceCallbacks, type TraceCompareToBundleOptions, type TraceCompareToExtDataOptions, type TraceDatasetReport, type TraceOptions, type TraceReport, type ValueSetting, type VarId, categorizeComparisonTestSummaries, checkReportFromSummary, checkSummaryFromReport, comparisonSummaryFromReport, createCheckDataCoordinator, createCheckDataCoordinatorForTests, createComparisonDataCoordinator, createConfig, datasetMessage, decodeImplVars, diffDatasets, diffGraphs, encodeImplVars, getScoresForTestSummaries, predicateMessage, runPerf, runSuite, runTrace, scenarioMessage, suiteSummaryFromReport, testSummaryFromReport };
2238
+ export declare function suiteSummaryFromReport(suiteReport: SuiteReport, elapsedMillis: number): SuiteSummary;
2239
+ //#endregion
2240
+ export type { Bundle, BundleGraphData, BundleGraphDatasetSpec, BundleGraphId, BundleGraphSpec, BundleGraphView, BundleGraphViewOptions, BundleModel, CancelRunPerf, CancelRunSuite, CancelRunTrace as CancelTrace, CheckConfig, CheckDataRef, CheckDataRefKey, CheckDataRefOp, CheckDataRequestKey, CheckDataset, CheckDatasetError, CheckDatasetReport, CheckGroupReport, CheckKey, CheckNameSpec, CheckOptions, CheckPredicateOp, CheckPredicateOpConstantRef, CheckPredicateOpDataRef, CheckPredicateOpRef, CheckPredicateReport, CheckPredicateSummary, CheckPredicateTimeOptions, CheckPredicateTimeRange, CheckPredicateTimeSingle, CheckPredicateTimeSpec, CheckRefDataset, CheckReport, CheckResult, CheckResultErrorInfo, CheckScenario, CheckScenarioError, CheckScenarioInputDesc, CheckScenarioReport, CheckStatus, CheckSummary, CheckTestReport, ComparisonConfig, ComparisonDataRequestKey, ComparisonDatasetOptions, ComparisonDatasets, ComparisonOptions, ComparisonPlot, ComparisonReportDetailItem, ComparisonReportDetailRow, ComparisonReportOptions, ComparisonReportSummaryRow, ComparisonReportSummarySection, ComparisonScenarios, ComparisonSortMode, Config, ConfigInitOptions, ConfigOptions, DatasetGroupName, EncodedImplVars, EncodedSubscript, EncodedVarInstance, EncodedVarType, EncodedVariable, ImplVar, ImplVarGroup, InputAliasName, InputGroupName, InputId, InputSettingGroupId, InputVar, LegendItem, LinkItem, LoadedBundle, ModelSpec, NamedBundle, OutputVar, PerfReport, RelatedItem, RunPerfCallbacks, RunPerfOptions, RunSuiteCallbacks, RunSuiteOptions, SliderInputVar, SwitchInputVar, RunTraceCallbacks as TraceCallbacks, TraceCompareToBundleOptions, TraceCompareToExtDataOptions, TraceDatasetReport, TraceOptions, TraceReport };
2241
+ //# sourceMappingURL=index.d.ts.map