Skip to content

Commit 62de7ba

Browse files
committed
fix: typing for filter options
1 parent e72335a commit 62de7ba

8 files changed

Lines changed: 17 additions & 15 deletions

File tree

testgen/ui/components/frontend/js/components/score_breakdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const ScoreBreakdown = (score, breakdown, category, scoreType, onViewDetails) =>
4242
return Select({
4343
label: '',
4444
value: selectedScoreType,
45-
options: scoreTypeOptions.map((s) => ({ label: SCORE_TYPE_LABEL[s], value: s, selected: s === scoreType })),
45+
options: scoreTypeOptions.map((s) => ({ label: SCORE_TYPE_LABEL[s], value: s })),
4646
height: 32,
4747
onChange: (value) => emitEvent('ScoreTypeChanged', { payload: value }),
4848
testId: 'score-type-selector',

testgen/ui/components/frontend/js/components/select.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* @type {object}
44
* @property {string} label
55
* @property {string} value
6-
* @property {boolean?} selected
76
* @property {string?} icon
87
*
98
* @typedef Properties

testgen/ui/components/frontend/js/pages/data_catalog.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @import { Column, Table } from '../data_profiling/data_profiling_utils.js';
33
* @import { TreeNode, SelectedNode } from '../components/tree.js';
4-
* @import { ProjectSummary } from '../types.js';
4+
* @import { FilterOption, ProjectSummary } from '../types.js';
55
*
66
* @typedef ColumnPath
77
* @type {object}
@@ -42,6 +42,7 @@
4242
* @typedef Properties
4343
* @type {object}
4444
* @property {ProjectSummary} project_summary
45+
* @property {FilterOption[]} table_group_filter_options
4546
* @property {ColumnPath[]} columns
4647
* @property {Table | Column} selected_item
4748
* @property {Object.<string, string[]>} tag_values

testgen/ui/components/frontend/js/pages/profiling_runs.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/**
2-
* @import { ProjectSummary } from '../types.js';
3-
* @import { SelectOption } from '../components/select.js';
4-
*
2+
* @import { FilterOption, ProjectSummary } from '../types.js'; *
53
*
64
* @typedef ProgressStep
75
* @type {object}
@@ -40,7 +38,7 @@
4038
* @type {object}
4139
* @property {ProjectSummary} project_summary
4240
* @property {ProfilingRun[]} profiling_runs
43-
* @property {SelectOption[]} table_group_options
41+
* @property {FilterOption[]} table_group_options
4442
* @property {Permissions} permissions
4543
*/
4644
import van from '../van.min.js';

testgen/ui/components/frontend/js/pages/project_dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @import { ProjectSummary } from '../types.js';
2+
* @import { FilterOption, ProjectSummary } from '../types.js';
33
* @import { TestSuiteSummary } from '../types.js';
44
*
55
* @typedef TableGroupSummary

testgen/ui/components/frontend/js/pages/test_runs.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/**
2-
* @import { ProjectSummary } from '../types.js';
3-
* @import { SelectOption } from '../components/select.js';
2+
* @import { FilterOption, ProjectSummary } from '../types.js';
43
*
54
* @typedef ProgressStep
65
* @type {object}
@@ -37,8 +36,8 @@
3736
* @type {object}
3837
* @property {ProjectSummary} project_summary
3938
* @property {TestRun[]} test_runs
40-
* @property {SelectOption[]} table_group_options
41-
* @property {SelectOption[]} test_suite_options
39+
* @property {FilterOption[]} table_group_options
40+
* @property {FilterOption[]} test_suite_options
4241
* @property {Permissions} permissions
4342
*/
4443
import van from '../van.min.js';

testgen/ui/components/frontend/js/pages/test_suites.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
2-
* @import { ProjectSummary } from '../types.js';
2+
* @import { FilterOption, ProjectSummary } from '../types.js';
33
* @import { TestSuiteSummary } from '../types.js';
4-
* @import { SelectOption } from '../components/select.js';
54
*
65
* @typedef Permissions
76
* @type {object}
@@ -11,7 +10,7 @@
1110
* @type {object}
1211
* @property {ProjectSummary} project_summary
1312
* @property {TestSuiteSummary} test_suites
14-
* @property {SelectOption[]} table_group_filter_options
13+
* @property {FilterOption[]} table_group_filter_options
1514
* @property {Permissions} permissions
1615
*/
1716
import van from '../van.min.js';

testgen/ui/components/frontend/js/types.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
/**
2+
* @typedef FilterOption
3+
* @type {object}
4+
* @property {string} label
5+
* @property {string} value
6+
* @property {boolean} selected
7+
*
28
* @typedef ProjectSummary
39
* @type {object}
410
* @property {string} project_code

0 commit comments

Comments
 (0)