@sdeverywhere/check-core 0.1.13 → 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,236 +592,260 @@ 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
  */
746
759
  type CheckDataRefKey = string;
747
760
  /**
748
- * The scenario and dataset referenced by a particular predicate (for cases
749
- * where the check is against another dataset rather than a constant value).
761
+ * The operation used to combine multiple referenced datasets into a single dataset.
762
+ */
763
+ type CheckDataRefOp = 'sum';
764
+ /**
765
+ * A single dataset (along with the scenario used to produce it) that is referenced
766
+ * by a predicate. Each of these corresponds to one data fetch.
767
+ */
768
+ interface CheckRefDataset {
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;
775
+ }
776
+ /**
777
+ * The dataset(s) referenced by a particular predicate op (for cases where the check
778
+ * is against other datasets rather than a constant value). When more than one dataset
779
+ * is referenced, the `op` determines how they are combined into a single dataset.
750
780
  */
751
781
  interface CheckDataRef {
752
- /** The key for the reference; can be undefined if inputs or datasets failed to match. */
753
- key?: CheckDataRefKey;
754
- /** The scenario used to generate the referenced dataset. */
755
- scenario: CheckScenario;
756
- /** The referenced dataset. */
757
- dataset: CheckDataset;
758
- }
759
-
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[];
786
+ }
787
+ //#endregion
788
+ //#region src/check/check-predicate.d.ts
760
789
  type CheckPredicateOp = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'approx';
761
-
790
+ //#endregion
791
+ //#region src/check/check-func.d.ts
762
792
  interface CheckResultErrorInfo {
763
- kind: 'unknown-dataset' | 'unknown-input' | 'unknown-input-group' | 'empty-input-group';
764
- name: string;
793
+ kind: 'unknown-dataset' | 'unknown-input' | 'unknown-input-group' | 'empty-input-group';
794
+ name: string;
765
795
  }
766
796
  interface CheckResult {
767
- status: 'passed' | 'failed' | 'error' | 'skipped';
768
- message?: string;
769
- failValue?: number;
770
- failOp?: CheckPredicateOp;
771
- failRefValue?: number;
772
- failTime?: number;
773
- errorInfo?: CheckResultErrorInfo;
774
- }
775
-
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
776
807
  type CheckKey = number;
777
-
808
+ //#endregion
809
+ //#region src/check/check-report.d.ts
778
810
  type CheckStatus = 'passed' | 'failed' | 'error' | 'skipped';
779
811
  interface CheckPredicateOpConstantRef {
780
- kind: 'constant';
781
- value: number;
812
+ kind: 'constant';
813
+ value: number;
782
814
  }
783
815
  interface CheckPredicateOpDataRef {
784
- kind: 'data';
785
- dataRef: CheckDataRef;
816
+ kind: 'data';
817
+ dataRef: CheckDataRef;
786
818
  }
787
819
  type CheckPredicateOpRef = CheckPredicateOpConstantRef | CheckPredicateOpDataRef;
788
820
  interface CheckPredicateReport {
789
- checkKey: CheckKey;
790
- result: CheckResult;
791
- opRefs: Map<CheckPredicateOp, CheckPredicateOpRef>;
792
- opValues: string[];
793
- time?: CheckPredicateTimeSpec;
794
- tolerance?: number;
821
+ checkKey: CheckKey;
822
+ result: CheckResult;
823
+ opRefs: Map<CheckPredicateOp, CheckPredicateOpRef>;
824
+ opValues: string[];
825
+ time?: CheckPredicateTimeSpec;
826
+ tolerance?: number;
795
827
  }
796
828
  interface CheckDatasetReport {
797
- checkDataset: CheckDataset;
798
- status: CheckStatus;
799
- predicates: CheckPredicateReport[];
829
+ checkDataset: CheckDataset;
830
+ status: CheckStatus;
831
+ predicates: CheckPredicateReport[];
800
832
  }
801
833
  interface CheckScenarioReport {
802
- checkScenario: CheckScenario;
803
- status: CheckStatus;
804
- datasets: CheckDatasetReport[];
834
+ checkScenario: CheckScenario;
835
+ status: CheckStatus;
836
+ datasets: CheckDatasetReport[];
805
837
  }
806
838
  interface CheckTestReport {
807
- name: string;
808
- status: CheckStatus;
809
- scenarios: CheckScenarioReport[];
839
+ name: string;
840
+ status: CheckStatus;
841
+ scenarios: CheckScenarioReport[];
810
842
  }
811
843
  interface CheckGroupReport {
812
- name: string;
813
- tests: CheckTestReport[];
844
+ name: string;
845
+ tests: CheckTestReport[];
814
846
  }
815
847
  interface CheckReport {
816
- groups: CheckGroupReport[];
848
+ groups: CheckGroupReport[];
817
849
  }
818
850
  type StyleFunc = (s: string) => string;
819
851
  /**
@@ -822,29 +854,30 @@ type StyleFunc = (s: string) => string;
822
854
  * @param scenario The scenario report.
823
855
  * @param bold A function that applies bold styling to a string.
824
856
  */
825
- declare function scenarioMessage(scenario: CheckScenarioReport, bold: StyleFunc): string;
857
+ export declare function scenarioMessage(scenario: CheckScenarioReport, bold: StyleFunc): string;
826
858
  /**
827
859
  * Return a string representation of the given dataset.
828
860
  *
829
861
  * @param dataset The dataset report.
830
862
  * @param bold A function that applies bold styling to a string.
831
863
  */
832
- declare function datasetMessage(dataset: CheckDatasetReport, bold: StyleFunc): string;
864
+ export declare function datasetMessage(dataset: CheckDatasetReport, bold: StyleFunc): string;
833
865
  /**
834
866
  * Return a string representation of the given predicate.
835
867
  *
836
868
  * @param predicate The predicate report.
837
869
  * @param bold A function that applies bold styling to a string.
838
870
  */
839
- declare function predicateMessage(predicate: CheckPredicateReport, bold: StyleFunc): string;
840
-
871
+ export declare function predicateMessage(predicate: CheckPredicateReport, bold: StyleFunc): string;
872
+ //#endregion
873
+ //#region src/check/check-summary.d.ts
841
874
  /**
842
875
  * A simplified/terse version of `CheckPredicateReport` that matches the
843
876
  * format of the JSON objects emitted by the CLI in terse mode.
844
877
  */
845
878
  interface CheckPredicateSummary {
846
- checkKey: CheckKey;
847
- result: CheckResult;
879
+ checkKey: CheckKey;
880
+ result: CheckResult;
848
881
  }
849
882
  /**
850
883
  * A simplified/terse version of `CheckReport` that matches the
@@ -853,7 +886,7 @@ interface CheckPredicateSummary {
853
886
  * of 'failed', 'error', or 'skipped'.
854
887
  */
855
888
  interface CheckSummary {
856
- predicateSummaries: CheckPredicateSummary[];
889
+ predicateSummaries: CheckPredicateSummary[];
857
890
  }
858
891
  /**
859
892
  * Convert a full `CheckReport` to a simplified `CheckSummary` that includes
@@ -862,7 +895,7 @@ interface CheckSummary {
862
895
  * @param checkReport The full check report.
863
896
  * @return The converted check summary.
864
897
  */
865
- declare function checkSummaryFromReport(checkReport: CheckReport): CheckSummary;
898
+ export declare function checkSummaryFromReport(checkReport: CheckReport): CheckSummary;
866
899
  /**
867
900
  * Convert a simplified `CheckSummary` to a full `CheckReport` that restores the
868
901
  * structure of the tests from the given configuration.
@@ -872,112 +905,113 @@ declare function checkSummaryFromReport(checkReport: CheckReport): CheckSummary;
872
905
  * @param skipChecks The checks that were skipped when the original report was created.
873
906
  * @return The converted check report.
874
907
  */
875
- declare function checkReportFromSummary(checkConfig: CheckConfig, checkSummary: CheckSummary, skipChecks?: CheckNameSpec[]): CheckReport | undefined;
876
-
877
- type ComparisonDatasetName = string;
878
- 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;
879
913
  /**
880
914
  * Specifies a dataset (variable) used for comparison.
881
915
  */
882
- interface ComparisonDatasetSpec {
883
- kind: 'dataset';
884
- /** The name of the dataset (variable). */
885
- name: ComparisonDatasetName;
886
- /**
887
- * The source of the dataset, if it is from an external data file. If
888
- * undefined, the dataset is assumed to be a model output.
889
- */
890
- source?: ComparisonDatasetSource;
891
- }
892
- type ComparisonScenarioId = string;
893
- type ComparisonScenarioTitle = string;
894
- type ComparisonScenarioSubtitle = string;
895
- type ComparisonScenarioInputName = string;
896
- 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';
897
931
  /**
898
932
  * Specifies an input that is set to a specific position (default / min / max).
899
933
  */
900
- interface ComparisonScenarioInputAtPositionSpec {
901
- kind: 'input-at-position';
902
- /** The requested input name or alias. */
903
- inputName: ComparisonScenarioInputName;
904
- /** The requested position of the input. */
905
- 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;
906
940
  }
907
941
  /**
908
942
  * Specifies an input that is set to a specific number value.
909
943
  */
910
- interface ComparisonScenarioInputAtValueSpec {
911
- kind: 'input-at-value';
912
- /** The requested input name or alias. */
913
- inputName: ComparisonScenarioInputName;
914
- /** The number value of the input. */
915
- 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;
916
950
  }
917
951
  /**
918
952
  * A single input setting for a scenario. An input can be set to a specific number value,
919
953
  * or it can be set to a "position" (default / min / max).
920
954
  */
921
- type ComparisonScenarioInputSpec = ComparisonScenarioInputAtPositionSpec | ComparisonScenarioInputAtValueSpec;
955
+ export type ComparisonScenarioInputSpec = ComparisonScenarioInputAtPositionSpec | ComparisonScenarioInputAtValueSpec;
922
956
  /**
923
957
  * Specifies a single scenario that sets one or more inputs to a value/position.
924
958
  */
925
- interface ComparisonScenarioWithInputsSpec {
926
- kind: 'scenario-with-inputs';
927
- /** The unique identifier for the scenario. */
928
- id?: ComparisonScenarioId;
929
- /** The title of the scenario. */
930
- title?: ComparisonScenarioTitle;
931
- /** The subtitle of the scenario. */
932
- subtitle?: ComparisonScenarioSubtitle;
933
- /** The input settings for this scenario. */
934
- 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[];
935
969
  }
936
970
  /**
937
971
  * Specifies a single scenario that configures inputs differently for the two
938
972
  * model instances.
939
973
  */
940
- interface ComparisonScenarioWithDistinctInputsSpec {
941
- kind: 'scenario-with-distinct-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 when run with the "left" model. */
949
- inputsL: ComparisonScenarioInputSpec[];
950
- /** The input settings for this scenario when run with the "right" model. */
951
- 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[];
952
986
  }
953
987
  /**
954
988
  * Specifies a single scenario that configures inputs according to the setting
955
989
  * group defined for each model instance.
956
990
  */
957
- interface ComparisonScenarioWithSettingGroupSpec {
958
- kind: 'scenario-with-setting-group';
959
- /** The unique identifier for the scenario. */
960
- id?: ComparisonScenarioId;
961
- /** The title of the scenario. */
962
- title?: ComparisonScenarioTitle;
963
- /** The subtitle of the scenario. */
964
- subtitle?: ComparisonScenarioSubtitle;
965
- /** The identifier of the input setting group as used in `ModelSpec.inputSettingGroups`. */
966
- 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;
967
1001
  }
968
1002
  /**
969
1003
  * Specifies a single scenario that sets all available inputs to position.
970
1004
  */
971
- interface ComparisonScenarioWithAllInputsSpec {
972
- kind: 'scenario-with-all-inputs';
973
- /** The unique identifier for the scenario. */
974
- id?: ComparisonScenarioId;
975
- /** The title of the scenario. */
976
- title?: ComparisonScenarioTitle;
977
- /** The subtitle of the scenario. */
978
- subtitle?: ComparisonScenarioSubtitle;
979
- /** The position that will be used for all available inputs. */
980
- 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;
981
1015
  }
982
1016
  /**
983
1017
  * Special preset that expands to many scenarios:
@@ -986,502 +1020,506 @@ interface ComparisonScenarioWithAllInputsSpec {
986
1020
  * - one scenario with the input at its minimum
987
1021
  * - one scenario with the input at its maximum
988
1022
  */
989
- interface ComparisonScenarioPresetMatrixSpec {
990
- kind: 'scenario-matrix';
1023
+ export interface ComparisonScenarioPresetMatrixSpec {
1024
+ kind: 'scenario-matrix';
991
1025
  }
992
1026
  /**
993
1027
  * A definition of input scenario(s). A scenario can set one input to a value/position, or it
994
1028
  * can set multiple inputs to particular values/positions.
995
1029
  */
996
- type ComparisonScenarioSpec = ComparisonScenarioWithInputsSpec | ComparisonScenarioWithDistinctInputsSpec | ComparisonScenarioWithSettingGroupSpec | ComparisonScenarioWithAllInputsSpec | ComparisonScenarioPresetMatrixSpec;
1030
+ export type ComparisonScenarioSpec = ComparisonScenarioWithInputsSpec | ComparisonScenarioWithDistinctInputsSpec | ComparisonScenarioWithSettingGroupSpec | ComparisonScenarioWithAllInputsSpec | ComparisonScenarioPresetMatrixSpec;
997
1031
  /** A reference to a scenario definition. */
998
- interface ComparisonScenarioRefSpec {
999
- kind: 'scenario-ref';
1000
- /** The ID of the scenario that is referenced. */
1001
- scenarioId: ComparisonScenarioId;
1002
- /** The optional title that is used instead of the referenced scenario's title. */
1003
- title?: ComparisonScenarioTitle;
1004
- /** The optional subtitle that is used instead of the referenced scenario's subtitle. */
1005
- 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;
1006
1040
  }
1007
1041
  /** Spec type that allows for matching a comparison scenario by title and subtitle. */
1008
- interface ComparisonScenarioTitleSpec {
1009
- /** The title of a comparison scenario. */
1010
- title: string;
1011
- /** The subtitle of a comparison scenario. */
1012
- 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;
1013
1047
  }
1014
- type ComparisonScenarioGroupId = string;
1015
- type ComparisonScenarioGroupTitle = string;
1048
+ export type ComparisonScenarioGroupId = string;
1049
+ export type ComparisonScenarioGroupTitle = string;
1016
1050
  /**
1017
1051
  * A definition of a group of input scenarios. Multiple scenarios can be grouped together under a single name, and
1018
1052
  * can later be referenced by group ID in a view definition.
1019
1053
  */
1020
- interface ComparisonScenarioGroupSpec {
1021
- kind: 'scenario-group';
1022
- /** The unique identifier for the group. */
1023
- id?: ComparisonScenarioGroupId;
1024
- /** The title of the group. */
1025
- title: ComparisonScenarioGroupTitle;
1026
- /** The scenarios that are included in this group. */
1027
- 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)[];
1028
1062
  }
1029
1063
  /** A reference to a scenario group definition. */
1030
- interface ComparisonScenarioGroupRefSpec {
1031
- kind: 'scenario-group-ref';
1032
- /** The ID of the scenario group that is referenced. */
1033
- groupId: ComparisonScenarioGroupId;
1064
+ export interface ComparisonScenarioGroupRefSpec {
1065
+ kind: 'scenario-group-ref';
1066
+ /** The ID of the scenario group that is referenced. */
1067
+ groupId: ComparisonScenarioGroupId;
1034
1068
  }
1035
- type ComparisonGraphId = string;
1069
+ export type ComparisonGraphId = string;
1036
1070
  /**
1037
1071
  * Specifies a list of graphs to be shown in a view.
1038
1072
  */
1039
- interface ComparisonGraphsArraySpec {
1040
- kind: 'graphs-array';
1041
- /** The array of IDs for graphs to show. */
1042
- graphIds: ComparisonGraphId[];
1073
+ export interface ComparisonGraphsArraySpec {
1074
+ kind: 'graphs-array';
1075
+ /** The array of IDs for graphs to show. */
1076
+ graphIds: ComparisonGraphId[];
1043
1077
  }
1044
1078
  /**
1045
1079
  * Specifies a preset list of graphs to be shown in a view.
1046
1080
  */
1047
- interface ComparisonGraphsPresetSpec {
1048
- kind: 'graphs-preset';
1049
- /** The preset (currently only "all" is supported, which shows all available graphs). */
1050
- 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';
1051
1085
  }
1052
- type ComparisonGraphGroupId = string;
1086
+ export type ComparisonGraphGroupId = string;
1053
1087
  /**
1054
1088
  * A definition of a group of graphs to be shown in a view. Multiple graphs can be grouped together
1055
1089
  * under a single ID, and can later be referenced by group ID in a view definition.
1056
1090
  */
1057
- interface ComparisonGraphGroupSpec {
1058
- kind: 'graph-group';
1059
- /** The unique identifier for the group. */
1060
- id: ComparisonGraphGroupId;
1061
- /** The graphs that are included in this group. */
1062
- 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[];
1063
1097
  }
1064
1098
  /** A reference to a graph group definition. */
1065
- interface ComparisonGraphGroupRefSpec {
1066
- kind: 'graph-group-ref';
1067
- /** The ID of the graph group that is referenced. */
1068
- groupId: ComparisonGraphGroupId;
1069
- }
1070
- type ComparisonViewTitle = string;
1071
- type ComparisonViewSubtitle = string;
1072
- type ComparisonViewRowTitle = string;
1073
- type ComparisonViewRowSubtitle = string;
1074
- type ComparisonViewItemTitle = string;
1075
- type ComparisonViewItemSubtitle = string;
1076
- 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';
1077
1111
  /**
1078
1112
  * Specifies a single comparison box to be shown in a view.
1079
1113
  */
1080
- interface ComparisonViewBoxSpec {
1081
- kind: 'view-box';
1082
- /** The title of the box. */
1083
- title: ComparisonViewItemTitle;
1084
- /** The subtitle of the box. */
1085
- subtitle?: ComparisonViewItemSubtitle;
1086
- /** The dataset shown in this comparison box. */
1087
- dataset: ComparisonDatasetSpec;
1088
- /** The scenario shown in this comparison box. */
1089
- 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;
1090
1124
  }
1091
1125
  /**
1092
1126
  * Specifies a row of comparison boxes to be shown in a view.
1093
1127
  */
1094
- interface ComparisonViewRowSpec {
1095
- kind: 'view-row';
1096
- /** The title of the row. */
1097
- title: ComparisonViewRowTitle;
1098
- /** The subtitle of the row. */
1099
- subtitle?: ComparisonViewRowSubtitle;
1100
- /** The array of boxes to be shown in the row. */
1101
- 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[];
1102
1136
  }
1103
1137
  /**
1104
1138
  * Specifies a set of graphs to be shown in a view.
1105
1139
  */
1106
- type ComparisonViewGraphsSpec = ComparisonGraphsPresetSpec | ComparisonGraphsArraySpec | ComparisonGraphGroupRefSpec;
1140
+ export type ComparisonViewGraphsSpec = ComparisonGraphsPresetSpec | ComparisonGraphsArraySpec | ComparisonGraphGroupRefSpec;
1107
1141
  /**
1108
1142
  * A definition of a view. A view presents a set of graphs, either for a single input scenario
1109
1143
  * or for a mix of different dataset/scenario combinations.
1110
1144
  */
1111
- interface ComparisonViewSpec {
1112
- kind: 'view';
1113
- /** The title of the view. If undefined, the title will be inferred from the scenario. */
1114
- title?: ComparisonViewTitle;
1115
- /** The subtitle of the view. If undefined, the subtitle will be inferred from the scenario. */
1116
- subtitle?: ComparisonViewSubtitle;
1117
- /** The scenario to be shown in the view if this is a single-scenario view. */
1118
- scenarioId?: ComparisonScenarioId;
1119
- /** The array of rows to be shown in the view if this is a freeform view. */
1120
- rows?: ComparisonViewRowSpec[];
1121
- /** The graphs to be shown in the view. */
1122
- graphs?: ComparisonViewGraphsSpec;
1123
- /**
1124
- * The order in which the graphs will be displayed. If undefined, the graphs will be
1125
- * displayed in the "default" order, i.e., in the same order that the IDs were specified.
1126
- */
1127
- graphOrder?: ComparisonViewGraphOrder;
1128
- }
1129
- 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;
1130
1164
  /**
1131
1165
  * Specifies a view group with an explicit array of view definitions.
1132
1166
  */
1133
- interface ComparisonViewGroupWithViewsSpec {
1134
- kind: 'view-group-with-views';
1135
- /** The title of the group of views. */
1136
- title: ComparisonViewGroupTitle;
1137
- /** The views that are included in this group. */
1138
- 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[];
1139
1173
  }
1140
1174
  /**
1141
1175
  * Specifies a view group by declaring the scenarios included in the group (one view per scenario), along
1142
1176
  * with a set of graphs that will shown in each view.
1143
1177
  */
1144
- interface ComparisonViewGroupWithScenariosSpec {
1145
- kind: 'view-group-with-scenarios';
1146
- /** The title of the group of views. */
1147
- title: ComparisonViewGroupTitle;
1148
- /** The scenarios to be included (one view will be created for each scenario). */
1149
- scenarios: (ComparisonScenarioRefSpec | ComparisonScenarioGroupRefSpec)[];
1150
- /** The graphs to be shown for each scenario view. */
1151
- graphs: ComparisonViewGraphsSpec;
1152
- /**
1153
- * The order in which the graphs will be displayed. If undefined, the graphs will be
1154
- * displayed in the "default" order, i.e., in the same order that the IDs were specified.
1155
- */
1156
- 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;
1157
1191
  }
1158
1192
  /**
1159
1193
  * A definition of a group of views. Multiple related views can be grouped together under a single title
1160
1194
  * to make them easy to distinguish in a report.
1161
1195
  */
1162
- type ComparisonViewGroupSpec = ComparisonViewGroupWithViewsSpec | ComparisonViewGroupWithScenariosSpec;
1196
+ export type ComparisonViewGroupSpec = ComparisonViewGroupWithViewsSpec | ComparisonViewGroupWithScenariosSpec;
1163
1197
  /**
1164
1198
  * Contains the scenario and view definitions from one or more sources (JSON/YAML files or manually
1165
1199
  * defined specs).
1166
1200
  */
1167
- interface ComparisonSpecs {
1168
- /** The requested scenarios. */
1169
- scenarios?: ComparisonScenarioSpec[];
1170
- /** The requested scenario groups. */
1171
- scenarioGroups?: ComparisonScenarioGroupSpec[];
1172
- /** The requested graph groups. */
1173
- graphGroups?: ComparisonGraphGroupSpec[];
1174
- /** The requested view groups. */
1175
- 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[];
1176
1210
  }
1177
1211
  /** A source of comparison scenario and specifications. */
1178
- interface ComparisonSpecsSource {
1179
- kind: 'yaml' | 'json';
1180
- /** The source filename, if known. */
1181
- filename?: string;
1182
- /** A string containing YAML or JSON content. */
1183
- content: string;
1184
- }
1185
-
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
1186
1221
  /** A resolved dataset that is being compared. */
1187
- interface ComparisonDataset {
1188
- kind: 'dataset';
1189
- /** The unique key for the dataset (i.e., output variable or static data). */
1190
- key: DatasetKey;
1191
- /**
1192
- * The resolved output variable from the "left" model that corresponds to this dataset,
1193
- * or undefined if the variable is not defined in the left model.
1194
- */
1195
- outputVarL?: OutputVar;
1196
- /**
1197
- * The resolved output variable from the "right" model that corresponds to this dataset,
1198
- * or undefined if the variable is not defined in the right model.
1199
- */
1200
- 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;
1201
1236
  }
1202
1237
  /** A unique key for a `ComparisonScenario`, generated internally for use by the library. */
1203
- type ComparisonScenarioKey = string & {
1204
- _brand?: 'ComparisonScenarioKey';
1238
+ export type ComparisonScenarioKey = string & {
1239
+ _brand?: 'ComparisonScenarioKey';
1205
1240
  };
1206
1241
  /** A fatal error indicating that no input variable matched the requested name. */
1207
- interface ComparisonResolverUnknownInputError {
1208
- kind: 'unknown-input';
1242
+ export interface ComparisonResolverUnknownInputError {
1243
+ kind: 'unknown-input';
1209
1244
  }
1210
1245
  /** A fatal error indicating that no input setting group matched the requested ID. */
1211
- interface ComparisonResolverUnknownInputSettingGroupError {
1212
- kind: 'unknown-input-setting-group';
1246
+ export interface ComparisonResolverUnknownInputSettingGroupError {
1247
+ kind: 'unknown-input-setting-group';
1213
1248
  }
1214
1249
  /**
1215
1250
  * A fatal resolution error. When this is set on an input state, the scenario
1216
1251
  * cannot be run for the affected side: spec construction for that side is
1217
1252
  * skipped and downstream UI annotations render it as an error.
1218
1253
  */
1219
- type ComparisonResolverError = ComparisonResolverUnknownInputError | ComparisonResolverUnknownInputSettingGroupError;
1254
+ export type ComparisonResolverError = ComparisonResolverUnknownInputError | ComparisonResolverUnknownInputSettingGroupError;
1220
1255
  /**
1221
1256
  * A non-fatal warning indicating that the resolved value falls outside the
1222
1257
  * declared `[minValue, maxValue]` range of a slider (or is not one of the
1223
1258
  * declared values of a switch). The scenario still runs with the requested
1224
1259
  * value; consumers (e.g. UI annotations) should flag it as a warning.
1225
1260
  */
1226
- interface ComparisonResolverValueOutOfRangeWarning {
1227
- kind: 'value-out-of-range';
1261
+ export interface ComparisonResolverValueOutOfRangeWarning {
1262
+ kind: 'value-out-of-range';
1228
1263
  }
1229
1264
  /**
1230
1265
  * A non-fatal resolution warning. Warnings do not prevent the scenario from
1231
1266
  * running; they are surfaced as annotations alongside the resolved value.
1232
1267
  */
1233
- type ComparisonResolverWarning = ComparisonResolverValueOutOfRangeWarning;
1268
+ export type ComparisonResolverWarning = ComparisonResolverValueOutOfRangeWarning;
1234
1269
  /** Describes the resolution state for a scenario input relative to a specific model. */
1235
- interface ComparisonScenarioInputState {
1236
- /** The matched input variable; can be undefined if no input matched. */
1237
- inputVar?: InputVar;
1238
- /** The position of the input, if this is a position scenario. */
1239
- position?: InputPosition;
1240
- /** The value of the input, for the given position or explicit value. */
1241
- value?: number;
1242
- /** The fatal error info if the input could not be resolved. */
1243
- error?: ComparisonResolverError;
1244
- /**
1245
- * Non-fatal advisory info about the resolved input. When set (without an
1246
- * accompanying `error`), the input still resolved and the scenario can run;
1247
- * consumers should surface the warning alongside the resolved value.
1248
- */
1249
- 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;
1250
1285
  }
1251
1286
  /** A scenario input that has been checked against both "left" and "right" model. */
1252
- interface ComparisonScenarioInput {
1253
- /** The requested name of the input. */
1254
- requestedName: string;
1255
- /** The resolved state of the input for the "left" model. */
1256
- stateL: ComparisonScenarioInputState;
1257
- /** The resolved state of the input for the "right" model. */
1258
- 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;
1259
1294
  }
1260
1295
  /** A configuration that sets model inputs to specific values. */
1261
- interface ComparisonScenarioInputSettings {
1262
- kind: 'input-settings';
1263
- /** The resolutions for the specified inputs in the scenario. */
1264
- inputs: ComparisonScenarioInput[];
1265
- /**
1266
- * Whether the settings differ between the "left" and "right" models. This is
1267
- * typically only used in the case of a scenario based on model-specific setting
1268
- * groups, where the set of inputs or the input values differ between the two models.
1269
- */
1270
- 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;
1271
1306
  }
1272
1307
  /** A configuration that sets all inputs in the model to a certain position. */
1273
- interface ComparisonScenarioAllInputsSettings {
1274
- kind: 'all-inputs-settings';
1275
- /** The input position that will be applied to all available inputs. */
1276
- 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;
1277
1312
  }
1278
1313
  /**
1279
1314
  * The configuration for an input scenario, either a set of individual input settings, or one
1280
1315
  * that sets all inputs in the model to a certain position.
1281
1316
  */
1282
- type ComparisonScenarioSettings = ComparisonScenarioInputSettings | ComparisonScenarioAllInputsSettings;
1317
+ export type ComparisonScenarioSettings = ComparisonScenarioInputSettings | ComparisonScenarioAllInputsSettings;
1283
1318
  /** A single resolved input scenario. */
1284
- interface ComparisonScenario {
1285
- kind: 'scenario';
1286
- /** The unique key for the scenario, generated internally for use by the library. */
1287
- key: ComparisonScenarioKey;
1288
- /** The unique user-defined identifier for the scenario. */
1289
- id?: ComparisonScenarioId;
1290
- /** The scenario title. */
1291
- title: string;
1292
- /** The scenario subtitle. */
1293
- subtitle?: string;
1294
- /** The resolved settings for the model inputs in this scenario. */
1295
- settings: ComparisonScenarioSettings;
1296
- /** The input scenario used to configure the "left" model, or undefined if data not available. */
1297
- specL?: ScenarioSpec;
1298
- /** The input scenario used to configure the "right" model, or undefined if data not available. */
1299
- 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;
1300
1335
  }
1301
1336
  /** An unresolved input scenario reference. */
1302
- interface ComparisonUnresolvedScenarioRef {
1303
- kind: 'unresolved-scenario-ref';
1304
- /** The ID of the referenced scenario that could not be resolved. */
1305
- 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;
1306
1341
  }
1307
1342
  /** A resolved group of input scenarios. */
1308
- interface ComparisonScenarioGroup {
1309
- kind: 'scenario-group';
1310
- /** The unique identifier for the group. */
1311
- id?: ComparisonScenarioGroupId;
1312
- /** The title of the group. */
1313
- title: ComparisonScenarioGroupTitle;
1314
- /**
1315
- * The scenarios that are included in this group. This includes scenarios that were successfully
1316
- * resolved as well as scenario references that could not be resolved.
1317
- */
1318
- 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)[];
1319
1354
  }
1320
1355
  /** An unresolved scenario group reference. */
1321
- interface ComparisonUnresolvedScenarioGroupRef {
1322
- kind: 'unresolved-scenario-group-ref';
1323
- /** The ID of the referenced scenario group that could not be resolved. */
1324
- 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;
1325
1360
  }
1326
1361
  /** A resolved group of graphs. */
1327
- interface ComparisonGraphGroup {
1328
- kind: 'graph-group';
1329
- /** The unique identifier for the group. */
1330
- id: ComparisonScenarioGroupId;
1331
- /** The graphs that are included in this group. */
1332
- 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[];
1333
1368
  }
1334
1369
  /**
1335
1370
  * A resolved comparison box to be shown in a view.
1336
1371
  */
1337
- interface ComparisonViewBox {
1338
- kind: 'view-box';
1339
- /** The title of the box. */
1340
- title: ComparisonViewItemTitle;
1341
- /** The subtitle of the box. */
1342
- subtitle?: ComparisonViewItemSubtitle;
1343
- /** The resolved dataset shown in this comparison box. */
1344
- dataset: ComparisonDataset;
1345
- /** The resolved scenario shown in this comparison box. */
1346
- 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;
1347
1382
  }
1348
1383
  /**
1349
1384
  * A resolved row of comparison boxes to be shown in a view.
1350
1385
  */
1351
- interface ComparisonViewRow {
1352
- kind: 'view-row';
1353
- /** The title of the row. */
1354
- title: ComparisonViewRowTitle;
1355
- /** The subtitle of the row. */
1356
- subtitle?: ComparisonViewRowSubtitle;
1357
- /** The array of resolved boxes to be shown in the row. */
1358
- 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[];
1359
1394
  }
1360
1395
  /**
1361
1396
  * A resolved view definition. A view presents a set of graphs, either for a single input scenario
1362
1397
  * or for a mix of different dataset/scenario combinations.
1363
1398
  */
1364
- interface ComparisonView {
1365
- kind: 'view';
1366
- /** The title of the view. */
1367
- title: ComparisonViewTitle;
1368
- /** The subtitle of the view. */
1369
- subtitle?: ComparisonViewSubtitle;
1370
- /** The resolved scenario to be shown in the view if this is a single-scenario view. */
1371
- scenario?: ComparisonScenario;
1372
- /** The array of resolved rows to be shown in the view if this is a freeform view. */
1373
- rows?: ComparisonViewRow[];
1374
- /** The graphs to be shown for each scenario view. */
1375
- graphIds: ComparisonGraphId[];
1376
- /** The order in which the graphs will be displayed. */
1377
- 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;
1378
1413
  }
1379
1414
  /** An unresolved view. */
1380
- interface ComparisonUnresolvedView {
1381
- kind: 'unresolved-view';
1382
- /** The requested title of the view, if provided. */
1383
- title?: ComparisonViewTitle;
1384
- /** The requested subtitle of the view, if provided. */
1385
- subtitle?: ComparisonViewSubtitle;
1386
- /** The name of the referenced dataset that could not be resolved. */
1387
- datasetName?: ComparisonDatasetName;
1388
- /** The source of the referenced dataset that could not be resolved. */
1389
- datasetSource?: ComparisonDatasetSource;
1390
- /** The ID of the referenced scenario that could not be resolved. */
1391
- scenarioId?: ComparisonScenarioId;
1392
- /** The ID of the referenced scenario group that could not be resolved. */
1393
- 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;
1394
1429
  }
1395
1430
  /** A resolved group of compared scenario/graph views. */
1396
- interface ComparisonViewGroup {
1397
- kind: 'view-group';
1398
- /** The title of the group of views. */
1399
- title: ComparisonViewGroupTitle;
1400
- /** The array of resolved (and unresolved) views that are included in this group. */
1401
- 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)[];
1402
1437
  }
1403
-
1438
+ //#endregion
1439
+ //#region src/perf/perf-stats.d.ts
1404
1440
  /**
1405
1441
  * A summary of timing samples collected during a performance run.
1406
1442
  */
1407
1443
  interface PerfReport {
1408
- /** Minimum sample time, in milliseconds. */
1409
- readonly minTime: number;
1410
- /** Maximum sample time, in milliseconds. */
1411
- readonly maxTime: number;
1412
- /**
1413
- * Trimmed mean (interquartile mean) computed from the middle 50% of samples,
1414
- * in milliseconds. This is more robust against outliers than a simple mean.
1415
- */
1416
- readonly avgTime: number;
1417
- /** Median (50th percentile) sample time, in milliseconds. */
1418
- readonly medianTime: number;
1419
- /** 95th percentile sample time, in milliseconds. */
1420
- readonly p95Time: number;
1421
- /** Population standard deviation across all samples, in milliseconds. */
1422
- readonly stdDev: number;
1423
- /** All recorded sample times, sorted ascending, in milliseconds. */
1424
- 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[];
1425
1461
  }
1426
1462
  /**
1427
1463
  * Collect performance timing samples and produce a robust statistical summary.
1428
1464
  */
1429
- declare class PerfStats {
1430
- private readonly times;
1431
- /**
1432
- * Record a single run time sample.
1433
- *
1434
- * @param timeInMillis The run time in milliseconds.
1435
- */
1436
- addRun(timeInMillis: number): void;
1437
- /**
1438
- * Get the raw run time samples that have been recorded.
1439
- *
1440
- * @returns A copy of the recorded run times, in insertion order.
1441
- */
1442
- getTimes(): number[];
1443
- /**
1444
- * Produce a `PerfReport` summarizing the recorded samples.
1445
- *
1446
- * @returns The summary report.
1447
- */
1448
- toReport(): PerfReport;
1449
- }
1450
-
1451
- interface DiffPoint {
1452
- time: number;
1453
- valueL: number;
1454
- valueR: number;
1455
- }
1456
- type DiffValidity = 'neither' | 'left-only' | 'right-only' | 'both';
1457
- interface DiffReport {
1458
- validity: DiffValidity;
1459
- minValue: number;
1460
- maxValue: number;
1461
- avgDiff: number;
1462
- minDiff: number;
1463
- maxDiff: number;
1464
- maxDiffPoint: DiffPoint;
1465
- }
1466
- declare function diffDatasets(datasetL: Dataset | undefined, datasetR: Dataset | undefined): DiffReport;
1467
-
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
1468
1506
  /**
1469
1507
  * The report for a single comparison test (involving a dataset produced under
1470
1508
  * a specific input scenario). This includes the full `DiffReport`, whereas
1471
1509
  * a `ComparisonTestSummary` only includes the `maxDiff` value.
1472
1510
  */
1473
- interface ComparisonTestReport {
1474
- /** The key of the scenario that was compared. */
1475
- scenarioKey: ComparisonScenarioKey;
1476
- /** The key of the dataset that was compared. */
1477
- datasetKey: DatasetKey;
1478
- /** The diff report for the comparison, or undefined if the test was skipped. */
1479
- diffReport?: DiffReport;
1480
- /**
1481
- * The diff report for the baseline scenario (all inputs at default), or undefined if this
1482
- * report is for the baseline scenario itself.
1483
- */
1484
- 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;
1485
1523
  }
1486
1524
  /**
1487
1525
  * A simplified/terse version of `ComparisonTestReport` that is used when writing
@@ -1489,30 +1527,30 @@ interface ComparisonTestReport {
1489
1527
  * minimum set of fields (only the `maxDiff` value instead of the full `DiffReport`)
1490
1528
  * to keep the file smaller when there are many reported differences.
1491
1529
  */
1492
- interface ComparisonTestSummary {
1493
- /** Short for `scenarioKey`. */
1494
- s: ComparisonScenarioKey;
1495
- /** Short for `datasetKey`. */
1496
- d: DatasetKey;
1497
- /** Short for `maxDiff`. */
1498
- md?: number;
1499
- /** Short for `avgDiff`. */
1500
- ad?: number;
1501
- /** Short for `maxDiff` relative to baseline `maxDiff`. */
1502
- mdb?: number;
1503
- /** Short for `avgDiff` relative to baseline `avgDiff`. */
1504
- 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;
1505
1543
  }
1506
1544
  /**
1507
1545
  * The roll-up report that contains the results of all individual comparison tests.
1508
1546
  */
1509
- interface ComparisonReport {
1510
- /** The set of all comparison test reports. */
1511
- testReports: ComparisonTestReport[];
1512
- /** The perf report for the "left" model. */
1513
- perfReportL: PerfReport;
1514
- /** The perf report for the "right" model. */
1515
- 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;
1516
1554
  }
1517
1555
  /**
1518
1556
  * A simplified/terse version of `ComparisonReport` that only includes the minimum set
@@ -1520,417 +1558,423 @@ interface ComparisonReport {
1520
1558
  * reported differences). This only includes comparison results for which there is
1521
1559
  * a non-zero `maxDiff` value.
1522
1560
  */
1523
- interface ComparisonSummary {
1524
- /** The simplified set of all terse comparison test summaries. */
1525
- testSummaries: ComparisonTestSummary[];
1526
- /** The perf report for the "left" model. */
1527
- perfReportL: PerfReport;
1528
- /** The perf report for the "right" model. */
1529
- 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;
1530
1568
  }
1531
-
1532
- type ComparisonGroupKind = 'by-dataset' | 'by-scenario';
1533
- 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;
1534
1573
  /**
1535
1574
  * A group of comparison test summaries associated with a particular scenario or dataset.
1536
1575
  */
1537
- interface ComparisonGroup {
1538
- /** The kind of group, either 'by-dataset' or 'by-scenario'. */
1539
- kind: ComparisonGroupKind;
1540
- /**
1541
- * The unique key for this group (a `DatasetKey` if grouped by dataset, or a
1542
- * `ComparisonScenarioKey` if grouped by scenario).
1543
- */
1544
- key: ComparisonGroupKey;
1545
- /** The comparison test summaries for this group. */
1546
- 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[];
1547
1586
  }
1548
1587
  /** Describes the "root" or primary item for a group of comparisons. */
1549
- type ComparisonGroupRoot = ComparisonDataset | ComparisonScenario;
1588
+ export type ComparisonGroupRoot = ComparisonDataset | ComparisonScenario;
1550
1589
  /** A summary of scores for a group of comparisons. */
1551
- interface ComparisonGroupScores {
1552
- /** The total number of comparisons (sample size) for this group. */
1553
- totalDiffCount: number;
1554
- /** The sum of the diff values for the active sort mode (e.g., `maxDiff`, `avgDiff`) for each threshold bucket. */
1555
- totalDiffByBucket: number[];
1556
- /** The number of comparisons that fall into each threshold bucket. */
1557
- diffCountByBucket: number[];
1558
- /** The percentage of comparisons that fall into each threshold bucket. */
1559
- 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[];
1560
1599
  }
1561
1600
  /**
1562
1601
  * A summary of a group of comparisons that includes the resolved scenario/dataset metadata
1563
1602
  * and score information for the group.
1564
1603
  */
1565
- interface ComparisonGroupSummary {
1566
- /** The metadata for the "root" or primary item for this group of comparisons. */
1567
- root: ComparisonGroupRoot;
1568
- /** The group containing the comparison summaries. */
1569
- group: ComparisonGroup;
1570
- /** The scores for this group, or undefined if comparisons were not performed for this group. */
1571
- 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;
1572
1611
  }
1573
1612
  /**
1574
1613
  * Breaks down a set of by-scenario or by-dataset groupings into distinct categories.
1575
1614
  */
1576
- interface ComparisonGroupSummariesByCategory {
1577
- /**
1578
- * All groups in a map, keyed by "group key" (either a dataset key or scenario key).
1579
- */
1580
- allGroupSummaries: Map<ComparisonGroupKey, ComparisonGroupSummary>;
1581
- /**
1582
- * Groups with items that have errors (are not valid) for both "left" and "right" models.
1583
- */
1584
- withErrors: ComparisonGroupSummary[];
1585
- /**
1586
- * Groups with items that are only valid for the "left" model (for example, datasets that
1587
- * were removed and no longer available in the "right" model).
1588
- */
1589
- onlyInLeft: ComparisonGroupSummary[];
1590
- /**
1591
- * Groups with items that are only valid for the "right" model (for example, scenarios
1592
- * for inputs that were added in the "right" model).
1593
- */
1594
- onlyInRight: ComparisonGroupSummary[];
1595
- /**
1596
- * Groups with one or more comparisons that have non-zero diff scores; the groups
1597
- * will be sorted by the diff score according to the active sort mode, with higher
1598
- * scores at the front of the array.
1599
- */
1600
- withDiffs: ComparisonGroupSummary[];
1601
- /**
1602
- * Groups where all comparisons have diff scores of zero (no differences between
1603
- * "left" and "right").
1604
- */
1605
- 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[];
1606
1645
  }
1607
1646
  /**
1608
1647
  * Rolls up all by-scenario and by-dataset groupings.
1609
1648
  */
1610
- interface ComparisonCategorizedResults {
1611
- /** All summaries for the comparison tests that were performed. */
1612
- allTestSummaries: ComparisonTestSummary[];
1613
- /** The full set of by-scenario groupings. */
1614
- byScenario: ComparisonGroupSummariesByCategory;
1615
- /** The full set of by-dataset groupings. */
1616
- 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;
1617
1656
  }
1618
-
1657
+ //#endregion
1658
+ //#region src/comparison/config/comparison-datasets.d.ts
1619
1659
  /**
1620
1660
  * Provides access to the set of dataset definitions (`ComparisonDataset` instances) that are used
1621
1661
  * when comparing the two models.
1622
1662
  */
1623
1663
  interface ComparisonDatasets {
1624
- /**
1625
- * Return all `ComparisonDataset` instances that are available for comparisons.
1626
- */
1627
- getAllDatasets(): IterableIterator<ComparisonDataset>;
1628
- /**
1629
- * Return the dataset metadata for the given key.
1630
- *
1631
- * @param datasetKey The key for the dataset.
1632
- */
1633
- getDataset(datasetKey: DatasetKey): ComparisonDataset | undefined;
1634
- /**
1635
- * Return the keys for the datasets that should be compared for the given scenario.
1636
- *
1637
- * @param scenario The scenario definition.
1638
- */
1639
- getDatasetKeysForScenario(scenario: ComparisonScenario): DatasetKey[];
1640
- /**
1641
- * Return the reference plots that should be shown in the comparison graph for the
1642
- * given dataset and scenario.
1643
- *
1644
- * @param datasetKey The key for the dataset.
1645
- * @param scenario The scenario for which the dataset will be displayed.
1646
- */
1647
- getReferencePlotsForDataset(datasetKey: DatasetKey, scenario: ComparisonScenario): ComparisonPlot[];
1648
- /**
1649
- * Return the context graph IDs that should be shown for the given dataset and scenario.
1650
- *
1651
- * @param datasetKey The key for the dataset.
1652
- * @param scenario The scenario for which the dataset will be displayed.
1653
- */
1654
- getContextGraphIdsForDataset(datasetKey: DatasetKey, scenario: ComparisonScenario): BundleGraphId[];
1655
- }
1656
-
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
1657
1698
  interface ComparisonScenarios {
1658
- /**
1659
- * Return all `ComparisonScenario` instances that are available for comparisons.
1660
- */
1661
- getAllScenarios(): IterableIterator<ComparisonScenario>;
1662
- /**
1663
- * Return the scenario definition for the given key.
1664
- *
1665
- * @param key The key for the scenario.
1666
- */
1667
- getScenario(key: ComparisonScenarioKey): ComparisonScenario | undefined;
1668
- }
1669
-
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
1670
1712
  /**
1671
1713
  * Describes an extra plot to be shown in a comparison graph.
1672
1714
  */
1673
1715
  interface ComparisonPlot {
1674
- /** The dataset key for the plot. */
1675
- datasetKey: DatasetKey;
1676
- /** The plot color. */
1677
- color: string;
1678
- /** The plot style. If undefined, defaults to 'normal'. */
1679
- style?: 'normal' | 'dashed';
1680
- /** The plot line width, in px units. If undefined, a default width will be used. */
1681
- 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;
1682
1724
  }
1683
1725
  interface ComparisonDatasetOptions {
1684
- /**
1685
- * The mapping of renamed dataset keys (old or "left" name as the map key,
1686
- * new or "right" name as the value).
1687
- */
1688
- renamedDatasetKeys?: Map<DatasetKey, DatasetKey>;
1689
- /**
1690
- * An optional function that allows for limiting the datasets that are compared
1691
- * for a given scenario. By default, all datasets are compared for a given
1692
- * scenario, but if a custom function is provided, it can return a subset of
1693
- * datasets (for example, to omit datasets that are not relevant).
1694
- */
1695
- datasetKeysForScenario?: (allDatasetKeys: DatasetKey[], scenario: ComparisonScenario) => DatasetKey[];
1696
- /**
1697
- * An optional function that allows for including additional reference plots
1698
- * on a comparison graph for a given dataset and scenario. By default, no
1699
- * additional reference plots are included, but if a custom function is
1700
- * provided, it can return an array of `ComparisonPlot` objects.
1701
- */
1702
- referencePlotsForDataset?: (dataset: ComparisonDataset, scenario: ComparisonScenario) => ComparisonPlot[];
1703
- /**
1704
- * An optional function that allows for customizing the set of context graphs
1705
- * that are shown for a given dataset and scenario. By default, all graphs in
1706
- * which the dataset appears will be shown, but if a custom function is provided,
1707
- * it can return a different set of graphs (for example, to omit graphs that are
1708
- * not relevant under the given scenario).
1709
- */
1710
- 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[];
1711
1753
  }
1712
1754
  /**
1713
1755
  * Describes a row in the comparison report summary view.
1714
1756
  */
1715
1757
  interface ComparisonReportSummaryRow {
1716
- /** The group summary represented by the row. */
1717
- groupSummary: ComparisonGroupSummary;
1718
- /** The custom title for the row (this overrides the default title derived from the summary). */
1719
- title?: string;
1720
- /** The custom subtitle for the row (this overrides the default subtitle derived from the summary). */
1721
- 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;
1722
1764
  }
1723
1765
  /**
1724
1766
  * Describes a section in the comparison report summary view.
1725
1767
  */
1726
1768
  interface ComparisonReportSummarySection {
1727
- /** The text to display for the section header. */
1728
- headerText: string;
1729
- /** The summary rows to display in the section. */
1730
- rows: ComparisonReportSummaryRow[];
1731
- /**
1732
- * The initial expanded state of the section. If undefined, defaults to 'expanded-if-diffs',
1733
- * meaning the section will be initially expanded only if any rows have differences, otherwise
1734
- * it will be initially collapsed.
1735
- */
1736
- initialState?: 'collapsed' | 'expanded' | 'expanded-if-diffs';
1737
- /**
1738
- * Whether the items in the section are stable, i.e., not changing from run to run. If
1739
- * undefined, defaults to false. This can be used to group items in the filter panel.
1740
- * Set it to true if the group contains a stable set of rows where the order does not
1741
- * change between runs. Set it to false (or leave it undefined) if the group contains
1742
- * rows that have a different order between runs (for example, "Scenarios producing
1743
- * differences").
1744
- */
1745
- 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;
1746
1788
  }
1747
1789
  /**
1748
1790
  * Describes an item (box) in the comparison report detail view.
1749
1791
  */
1750
1792
  interface ComparisonReportDetailItem {
1751
- /** The title of the item. */
1752
- title: string;
1753
- /** The subtitle of the item (if any). */
1754
- subtitle?: string;
1755
- /** The scenario for the item. */
1756
- scenario: ComparisonScenario;
1757
- /** The test summary for the item. */
1758
- 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;
1759
1801
  }
1760
1802
  /**
1761
1803
  * Describes a row in the comparison report detail view.
1762
1804
  */
1763
1805
  interface ComparisonReportDetailRow {
1764
- /** The title of the row. */
1765
- title: string;
1766
- /** The subtitle of the row (if any). */
1767
- subtitle?: string;
1768
- /** The score for the row (the meaning of the value depends on the chosen statistical method). */
1769
- score: number;
1770
- /** The items in this row (one item per box). */
1771
- 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[];
1772
1814
  }
1773
1815
  interface ComparisonReportOptions {
1774
- /**
1775
- * An optional function that allows for customizing the order and grouping of
1776
- * sections and rows in the "comparisons by scenario" summary view.
1777
- *
1778
- * @param summaries The comparison summaries, one summary per scenario.
1779
- * @returns The sections to display in the "comparisons by scenario" summary view.
1780
- */
1781
- summarySectionsForComparisonsByScenario?: (summaries: ComparisonGroupSummariesByCategory) => ComparisonReportSummarySection[];
1782
- /**
1783
- * An optional function that allows for customizing the order and grouping of
1784
- * sections and rows in the "comparisons by dataset" summary view.
1785
- *
1786
- * @param summaries The comparison summaries, one summary per dataset.
1787
- * @returns The sections to display in the "comparisons by dataset" summary view.
1788
- */
1789
- summarySectionsForComparisonsByDataset?: (summaries: ComparisonGroupSummariesByCategory) => ComparisonReportSummarySection[];
1790
- /**
1791
- * An optional function that allows for customizing the order of rows and boxes
1792
- * in the detail view for a scenario.
1793
- *
1794
- * @param rows The original rows to be displayed in the detail view for a scenario.
1795
- * @returns The customized rows to display in the detail view for a scenario.
1796
- */
1797
- detailRowsForScenario?: (rows: ComparisonReportDetailRow[]) => ComparisonReportDetailRow[];
1798
- /**
1799
- * An optional function that allows for customizing the order of rows and boxes
1800
- * in the detail view for a dataset.
1801
- *
1802
- * @param rows The original rows to be displayed in the detail view for a dataset.
1803
- * @returns The customized rows to display in the detail view for a dataset.
1804
- */
1805
- 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[];
1806
1848
  }
1807
1849
  interface ComparisonOptions {
1808
- /** The left-side ("baseline") bundle being compared. */
1809
- baseline: NamedBundle;
1810
- /**
1811
- * The array of thresholds used to color differences. Defaults to [1, 5, 10]
1812
- * which will use buckets of 0%, 0-1%, 1-5%, 5-10%, and >10%.
1813
- */
1814
- thresholds?: number[];
1815
- /**
1816
- * The array of ratio thresholds used to color differences when relative sorting is
1817
- * active. Defaults to [1, 2, 3] which will use buckets of 0, 0-1, 1-2, 2-3, and >3.
1818
- */
1819
- ratioThresholds?: number[];
1820
- /**
1821
- * The requested comparison scenario and view specifications. These can be
1822
- * specified in YAML or JSON files, or using `Spec` objects.
1823
- */
1824
- specs: (ComparisonSpecs | ComparisonSpecsSource)[];
1825
- /** Optional configuration for the datasets that are compared for different scenarios. */
1826
- datasets?: ComparisonDatasetOptions;
1827
- /** Options for customizing the comparison report. */
1828
- 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;
1829
1871
  }
1830
1872
  interface ComparisonConfig {
1831
- /** The loaded left-side ("baseline") bundle being compared. */
1832
- bundleL: LoadedBundle;
1833
- /** The loaded right-side ("current") bundle being compared. */
1834
- bundleR: LoadedBundle;
1835
- /**
1836
- * The array of thresholds used to color differences. For example, [1, 5, 10] will use
1837
- * buckets of 0%, 0-1%, 1-5%, 5-10%, and >10%.
1838
- */
1839
- thresholds: number[];
1840
- /**
1841
- * The array of ratio thresholds used to color differences when relative sorting is
1842
- * active. For example, [1, 2, 3] will use buckets of 0, 0-1, 1-2, 2-3, and >3.
1843
- */
1844
- ratioThresholds: number[];
1845
- /** The set of resolved scenarios that will be compared. */
1846
- scenarios: ComparisonScenarios;
1847
- /** The set of resolved datasets that will be compared. */
1848
- datasets: ComparisonDatasets;
1849
- /** The set of resolved view groups. */
1850
- viewGroups: ComparisonViewGroup[];
1851
- /** Options for customizing the comparison report. */
1852
- reportOptions?: ComparisonReportOptions;
1853
- }
1854
-
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
1855
1898
  type ComparisonDataRequestKey = string;
1856
1899
  /**
1857
1900
  * Options for `requestDatasetMaps`.
1858
1901
  */
1859
1902
  interface RequestDatasetMapsOptions {
1860
- /** Optional constant overrides for the "left" model. */
1861
- constantsL?: ConstantOverride[];
1862
- /** Optional constant overrides for the "right" model. */
1863
- constantsR?: ConstantOverride[];
1864
- /** Optional lookup overrides for the "left" model. */
1865
- lookupsL?: LookupOverride[];
1866
- /** Optional lookup overrides for the "right" model. */
1867
- 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[];
1868
1911
  }
1869
1912
  /**
1870
1913
  * Coordinates loading of data in parallel from two models.
1871
1914
  */
1872
- declare class ComparisonDataCoordinator {
1873
- private readonly taskQueue;
1874
- constructor(taskQueue: TaskQueue);
1875
- /**
1876
- * Request datasets from the two models.
1877
- *
1878
- * @param requestKey The unique key for the request.
1879
- * @param sourceL The source of the first ("left") dataset. If "left", the datasets will
1880
- * be fetched from the "left" bundle's model, otherwise they will be fetched from the
1881
- * "right" bundle's model.
1882
- * @param scenarioSpecL The scenario used for the first ("left") model of the comparison.
1883
- * @param sourceR The source of the second ("right") dataset. If "left", the datasets
1884
- * will be fetched from the "left" bundle's model, otherwise they will be fetched from
1885
- * the "right" bundle's model.
1886
- * @param scenarioSpecR The scenario used for the second ("right") model of the comparison.
1887
- * @param datasetKeys The keys of the datasets to be fetched.
1888
- * @param options Optional configuration including constant and lookup overrides.
1889
- * @param onResponse The callback that will be called with the dataset maps.
1890
- */
1891
- 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;
1892
- /**
1893
- * Request graph data from the two models.
1894
- *
1895
- * @param requestKey The unique key for the request.
1896
- * @param sourceL The source of the first ("left") dataset. If "left", the datasets will
1897
- * be fetched from the "left" bundle's model, otherwise they will be fetched from the
1898
- * "right" bundle's model.
1899
- * @param scenarioSpecL The scenario used for the first ("left") model of the comparison.
1900
- * @param sourceR The source of the second ("right") dataset. If "left", the datasets
1901
- * will be fetched from the "left" bundle's model, otherwise they will be fetched from
1902
- * the "right" bundle's model.
1903
- * @param scenarioSpecR The scenario used for the second ("right") model of the comparison.
1904
- * @param graphId The ID of the graph for which data will be fetched.
1905
- * @param onResponse The callback that will be called with the graph data.
1906
- */
1907
- requestGraphData(requestKey: ComparisonDataRequestKey, sourceL: 'left' | 'right', scenarioSpecL: ScenarioSpec, sourceR: 'left' | 'right', scenarioSpecR: ScenarioSpec, graphId: BundleGraphId, onResponse: (graphDataL?: BundleGraphData, graphDataR?: BundleGraphData) => void): void;
1908
- cancelRequest(key: ComparisonDataRequestKey): void;
1909
- }
1910
- declare function createComparisonDataCoordinator(): ComparisonDataCoordinator;
1911
-
1912
- type GraphInclusion = 'neither' | 'left-only' | 'right-only' | 'both';
1913
- interface GraphComparisonMetadataReport {
1914
- /** The key for the metadata field. */
1915
- key: string;
1916
- /** The value of the metadata field in the left bundle. */
1917
- valueL?: string;
1918
- /** The value of the metadata field in the right bundle. */
1919
- valueR?: string;
1920
- }
1921
- interface GraphComparisonDatasetReport {
1922
- /** The dataset key. */
1923
- datasetKey: DatasetKey;
1924
- /** The max diff for this dataset. */
1925
- maxDiff?: number;
1926
- }
1927
- interface GraphComparisonReport {
1928
- /** Indicates which bundles the graph is defined in. */
1929
- inclusion: GraphInclusion;
1930
- /** The metadata fields with differences. */
1931
- metadataReports: GraphComparisonMetadataReport[];
1932
- /** The datasets with differences. */
1933
- 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[];
1934
1978
  }
1935
1979
  /**
1936
1980
  * Comparison the metadata and datasets for the given graphs.
@@ -1940,8 +1984,9 @@ interface GraphComparisonReport {
1940
1984
  * @param scenarioKey The key of the scenario used for comparing datasets.
1941
1985
  * @param testSummaries The set of test summaries from a previous comparison run.
1942
1986
  */
1943
- declare function diffGraphs(graphL: BundleGraphSpec | undefined, graphR: BundleGraphSpec | undefined, scenarioKey: ComparisonScenarioKey, testSummaries: ComparisonTestSummary[]): GraphComparisonReport;
1944
-
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
1945
1990
  /**
1946
1991
  * Convert a full `ComparisonReport` to a simplified `ComparisonSummary` that includes
1947
1992
  * the minimum set of fields needed to keep the file smaller when there are many
@@ -1951,7 +1996,7 @@ declare function diffGraphs(graphL: BundleGraphSpec | undefined, graphR: BundleG
1951
1996
  * @param comparisonReport The full comparison report.
1952
1997
  * @return The terse summary.
1953
1998
  */
1954
- declare function comparisonSummaryFromReport(comparisonReport: ComparisonReport): ComparisonSummary;
1999
+ export declare function comparisonSummaryFromReport(comparisonReport: ComparisonReport): ComparisonSummary;
1955
2000
  /**
1956
2001
  * Convert a full `ComparisonTestReport` to a terse `ComparisonTestSummary`. This will
1957
2002
  * return undefined if the test has a zero `maxDiff` value.
@@ -1961,11 +2006,13 @@ declare function comparisonSummaryFromReport(comparisonReport: ComparisonReport)
1961
2006
  * @param baselineAvgDiff The avg diff for the baseline scenario, or undefined if not available.
1962
2007
  * @return The terse comparison test summary.
1963
2008
  */
1964
- declare function testSummaryFromReport(r: ComparisonTestReport, baselineMaxDiff: number | undefined, baselineAvgDiff: number | undefined): ComparisonTestSummary | undefined;
1965
-
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
1966
2012
  /** The available sort modes for categorizing comparison groups. */
1967
2013
  type ComparisonSortMode = 'max-diff' | 'avg-diff' | 'max-diff-relative' | 'avg-diff-relative';
1968
-
2014
+ //#endregion
2015
+ //#region src/comparison/report/comparison-group-scores.d.ts
1969
2016
  /**
1970
2017
  * Compute the overall scores for the given group of comparison test summaries.
1971
2018
  *
@@ -1974,8 +2021,9 @@ type ComparisonSortMode = 'max-diff' | 'avg-diff' | 'max-diff-relative' | 'avg-d
1974
2021
  * the scores will be summarized.
1975
2022
  * @param sortMode The sort mode to determine which field to use for scoring.
1976
2023
  */
1977
- declare function getScoresForTestSummaries(testSummaries: ComparisonTestSummary[], thresholds: number[], sortMode: ComparisonSortMode): ComparisonGroupScores;
1978
-
2024
+ export declare function getScoresForTestSummaries(testSummaries: ComparisonTestSummary[], thresholds: number[], sortMode: ComparisonSortMode): ComparisonGroupScores;
2025
+ //#endregion
2026
+ //#region src/comparison/report/comparison-grouping.d.ts
1979
2027
  /**
1980
2028
  * Given a set of terse test summaries (which only includes summaries for tests with non-zero `maxDiff`
1981
2029
  * scores), restore the full set of summaries and then categorize them.
@@ -1984,74 +2032,77 @@ declare function getScoresForTestSummaries(testSummaries: ComparisonTestSummary[
1984
2032
  * @param terseSummaries The set of terse test summaries.
1985
2033
  * @param sortMode The sort mode to determine which field to use for scoring.
1986
2034
  */
1987
- declare function categorizeComparisonTestSummaries(comparisonConfig: ComparisonConfig, terseSummaries: ComparisonTestSummary[], sortMode: ComparisonSortMode): ComparisonCategorizedResults;
1988
-
2035
+ export declare function categorizeComparisonTestSummaries(comparisonConfig: ComparisonConfig, terseSummaries: ComparisonTestSummary[], sortMode: ComparisonSortMode): ComparisonCategorizedResults;
2036
+ //#endregion
2037
+ //#region src/config/config-types.d.ts
1989
2038
  /**
1990
2039
  * Additional options that are passed to `getConfigOptions`.
1991
2040
  */
1992
2041
  interface ConfigInitOptions {
1993
- /** If defined, overrides the displayed name of the baseline ("left") bundle. */
1994
- bundleNameL?: string;
1995
- /** If defined, overrides the displayed name of the current ("right") bundle. */
1996
- 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;
1997
2046
  }
1998
2047
  /**
1999
2048
  * The user-specified options used by the library to resolve and initialize a `Config` instance.
2000
2049
  */
2001
2050
  interface ConfigOptions {
2002
- /**
2003
- * The bundle being checked. This bundle will also be compared against the
2004
- * "baseline" bundle, if `comparison` options are defined.
2005
- */
2006
- current: NamedBundle;
2007
- /**
2008
- * The model check options.
2009
- */
2010
- check: CheckOptions;
2011
- /**
2012
- * The model comparison options.
2013
- */
2014
- comparison?: ComparisonOptions;
2015
- /**
2016
- * The number of model instances to initialize for each bundle.
2017
- *
2018
- * If undefined, the default behavior will be used, which is to initialize a single
2019
- * model instance for each bundle.
2020
- *
2021
- * If you set this to a value greater than 1, it will allow multiple pairs of model
2022
- * instances to be run concurrently. For example, if the number of CPU cores is 8,
2023
- * setting this to 4 will allow 4 pairs of model instances to be run concurrently,
2024
- * using all available cores.
2025
- *
2026
- * If you set this to 0, the implementation will automatically choose a value based on
2027
- * the number of available CPU cores (i.e., the number of cores divided by 2).
2028
- */
2029
- 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;
2030
2079
  }
2031
2080
  /**
2032
2081
  * The resolved configuration for check and comparison tests.
2033
2082
  */
2034
2083
  interface Config {
2035
- /** The resolved check test configuration. */
2036
- check: CheckConfig;
2037
- /** The resolved comparison test configuration. */
2038
- comparison?: ComparisonConfig;
2039
- }
2040
-
2041
- declare function createConfig(options: ConfigOptions): Promise<Config>;
2042
-
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
2043
2094
  type CancelRunPerf = () => void;
2044
2095
  interface RunPerfCallbacks {
2045
- onComplete?: (reportL: PerfReport, reportR: PerfReport) => void;
2046
- onError?: (error: Error) => void;
2096
+ onComplete?: (reportL: PerfReport, reportR: PerfReport) => void;
2097
+ onError?: (error: Error) => void;
2047
2098
  }
2048
2099
  interface RunPerfOptions {
2049
- /** The mode to run the performance tests (default is 'serial'). */
2050
- mode?: 'serial' | 'parallel';
2051
- /** The number of warmups for each perf run (default is 5). */
2052
- warmupCount?: number;
2053
- /** The number of times to run the model for each perf run (default is 100). */
2054
- 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;
2055
2106
  }
2056
2107
  /**
2057
2108
  * Run performance tests on the bundle models.
@@ -2060,8 +2111,9 @@ interface RunPerfOptions {
2060
2111
  * @param options The options for the performance run.
2061
2112
  * @return A function that will cancel the process when invoked.
2062
2113
  */
2063
- declare function runPerf(callbacks: RunPerfCallbacks, options?: RunPerfOptions): CancelRunPerf;
2064
-
2114
+ export declare function runPerf(callbacks: RunPerfCallbacks, options?: RunPerfOptions): CancelRunPerf;
2115
+ //#endregion
2116
+ //#region src/trace/trace-report.d.ts
2065
2117
  /**
2066
2118
  * The report for a single trace comparison between two datasets.
2067
2119
  *
@@ -2069,41 +2121,42 @@ declare function runPerf(callbacks: RunPerfCallbacks, options?: RunPerfOptions):
2069
2121
  * diff points. Maybe we can combine them and make the points array an opt-in thing.
2070
2122
  */
2071
2123
  interface TraceDatasetReport {
2072
- datasetKey: DatasetKey;
2073
- validity: DiffValidity;
2074
- points: Map<number, DiffPoint>;
2075
- minValue: number;
2076
- maxValue: number;
2077
- avgDiff: number;
2078
- minDiff: number;
2079
- maxDiff: number;
2080
- 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;
2081
2133
  }
2082
2134
  /**
2083
2135
  * The roll-up report that contains the results of the trace comparisons
2084
2136
  * for all datasets.
2085
2137
  */
2086
2138
  interface TraceReport {
2087
- datasetReports: Map<DatasetKey, TraceDatasetReport>;
2139
+ datasetReports: Map<DatasetKey, TraceDatasetReport>;
2088
2140
  }
2089
-
2141
+ //#endregion
2142
+ //#region src/trace/trace-runner.d.ts
2090
2143
  type CancelRunTrace = () => void;
2091
2144
  interface RunTraceCallbacks {
2092
- onComplete?: (traceReport: TraceReport) => void;
2093
- onError?: (error: Error) => void;
2145
+ onComplete?: (traceReport: TraceReport) => void;
2146
+ onError?: (error: Error) => void;
2094
2147
  }
2095
2148
  interface TraceCompareToBundleOptions {
2096
- kind: 'compare-to-bundle';
2097
- bundleSide0: 'left' | 'right';
2098
- scenarioSpec0: ScenarioSpec;
2099
- bundleSide1: 'left' | 'right';
2100
- scenarioSpec1: ScenarioSpec;
2149
+ kind: 'compare-to-bundle';
2150
+ bundleSide0: 'left' | 'right';
2151
+ scenarioSpec0: ScenarioSpec;
2152
+ bundleSide1: 'left' | 'right';
2153
+ scenarioSpec1: ScenarioSpec;
2101
2154
  }
2102
2155
  interface TraceCompareToExtDataOptions {
2103
- kind: 'compare-to-ext-data';
2104
- extData: DatasetMap;
2105
- bundleSide: 'left' | 'right';
2106
- scenarioSpec: ScenarioSpec;
2156
+ kind: 'compare-to-ext-data';
2157
+ extData: DatasetMap;
2158
+ bundleSide: 'left' | 'right';
2159
+ scenarioSpec: ScenarioSpec;
2107
2160
  }
2108
2161
  type TraceOptions = TraceCompareToBundleOptions | TraceCompareToExtDataOptions;
2109
2162
  /**
@@ -2114,16 +2167,17 @@ type TraceOptions = TraceCompareToBundleOptions | TraceCompareToExtDataOptions;
2114
2167
  * @param options Options to control how the trace is run.
2115
2168
  * @return A function that will cancel the process when invoked.
2116
2169
  */
2117
- declare function runTrace(modelSpec: ModelSpec, callbacks: RunTraceCallbacks, options: TraceOptions): CancelRunTrace;
2118
-
2170
+ export declare function runTrace(modelSpec: ModelSpec, callbacks: RunTraceCallbacks, options: TraceOptions): CancelRunTrace;
2171
+ //#endregion
2172
+ //#region src/suite/suite-report-types.d.ts
2119
2173
  /**
2120
2174
  * The report for a single run of the full check+comparison test suite.
2121
2175
  */
2122
- interface SuiteReport {
2123
- /** The check report. */
2124
- checkReport: CheckReport;
2125
- /** The comparison report (only defined if comparisons were enabled). */
2126
- 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;
2127
2181
  }
2128
2182
  /**
2129
2183
  * A simplified/terse version of `SuiteReport` that is used when writing
@@ -2132,34 +2186,35 @@ interface SuiteReport {
2132
2186
  * full `DiffReport` for each comparison test) to keep the file smaller
2133
2187
  * when there are many reported differences.
2134
2188
  */
2135
- interface SuiteSummary {
2136
- /** The date and time the suite was run (in ISO 8601 format, as generated by `Date.toISOString`). */
2137
- date: string;
2138
- /** The time in milliseconds that it took to run the suite. */
2139
- elapsed: number;
2140
- /** The check summary. */
2141
- checkSummary: CheckSummary;
2142
- /** The comparison summary (only defined if comparisons were enabled). */
2143
- comparisonSummary?: ComparisonSummary;
2144
- }
2145
-
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
2146
2201
  type CancelRunSuite = () => void;
2147
2202
  interface RunSuiteCallbacks {
2148
- onProgress?: (pct: number) => void;
2149
- onComplete?: (suiteReport: SuiteReport) => void;
2150
- onError?: (error: Error) => void;
2203
+ onProgress?: (pct: number) => void;
2204
+ onComplete?: (suiteReport: SuiteReport) => void;
2205
+ onError?: (error: Error) => void;
2151
2206
  }
2152
2207
  interface RunSuiteOptions {
2153
- /**
2154
- * The check tests to skip. Note that checks are matched by group and name
2155
- * (case insensitive).
2156
- */
2157
- skipChecks?: CheckNameSpec[];
2158
- /**
2159
- * The comparison scenarios to skip. Note that scenarios are matched by
2160
- * title and subtitle (case insensitive).
2161
- */
2162
- 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[];
2163
2218
  }
2164
2219
  /**
2165
2220
  * Run the full suite of checks and comparisons defined in the given configuration.
@@ -2169,8 +2224,9 @@ interface RunSuiteOptions {
2169
2224
  * @param options Options to control how the tests are run.
2170
2225
  * @return A function that will cancel the process when invoked.
2171
2226
  */
2172
- declare function runSuite(config: Config, callbacks: RunSuiteCallbacks, options?: RunSuiteOptions): CancelRunSuite;
2173
-
2227
+ export declare function runSuite(config: Config, callbacks: RunSuiteCallbacks, options?: RunSuiteOptions): CancelRunSuite;
2228
+ //#endregion
2229
+ //#region src/suite/suite-reporting.d.ts
2174
2230
  /**
2175
2231
  * Convert a full `SuiteReport` to a simplified `SuiteSummary` that only includes
2176
2232
  * failed/errored checks or comparisons with differences.
@@ -2179,6 +2235,7 @@ declare function runSuite(config: Config, callbacks: RunSuiteCallbacks, options?
2179
2235
  * @param elapsedMillis The time in milliseconds that it took to run the suite.
2180
2236
  * @return The converted suite summary.
2181
2237
  */
2182
- declare function suiteSummaryFromReport(suiteReport: SuiteReport, elapsedMillis: number): SuiteSummary;
2183
-
2184
- 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 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 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