Skip to content

Commit e5b4de0

Browse files
authored
fix: readonly type changes (#2610)
Updated types to pass CI check for this PR: deephaven-ent/iris#3775 JIRA ticket created to update JS API types: https://deephaven.atlassian.net/browse/DH-21450
1 parent 0cab21d commit e5b4de0

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/components/src/navigation/DashboardList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { GLOBAL_SHORTCUTS } from '../shortcuts';
1717

1818
export interface DashboardListProps {
1919
onSelect: (tab: NavTabItem) => void;
20-
tabs?: NavTabItem[];
20+
tabs?: readonly NavTabItem[];
2121
}
2222

2323
/**

packages/jsapi-utils/src/TableUtils.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,12 +1852,13 @@ export class TableUtils {
18521852
*/
18531853
async applyFilter<T extends DhType.Table | DhType.TreeTable>(
18541854
table: T | null | undefined,
1855-
filters: DhType.FilterCondition[],
1855+
filters: readonly DhType.FilterCondition[],
18561856
timeout = TableUtils.APPLY_TABLE_CHANGE_TIMEOUT_MS
18571857
): Promise<T | null> {
18581858
const { dh } = this;
18591859
return TableUtils.executeAndWaitForEvent(
1860-
t => t?.applyFilter(filters),
1860+
// TODO: #21450 Update JS API to accept readonly arrays
1861+
t => t?.applyFilter(filters as DhType.FilterCondition[]),
18611862
table,
18621863
dh.Table.EVENT_FILTERCHANGED,
18631864
timeout
@@ -1875,12 +1876,13 @@ export class TableUtils {
18751876
*/
18761877
async applySort<T extends DhType.Table | DhType.TreeTable>(
18771878
table: T | null | undefined,
1878-
sorts: DhType.Sort[],
1879+
sorts: readonly DhType.Sort[],
18791880
timeout = TableUtils.APPLY_TABLE_CHANGE_TIMEOUT_MS
18801881
): Promise<T | null> {
18811882
const { dh } = this;
18821883
return TableUtils.executeAndWaitForEvent(
1883-
t => t?.applySort(sorts),
1884+
// TODO: #21450 Update JS API to accept readonly arrays
1885+
t => t?.applySort(sorts as DhType.Sort[]),
18841886
table,
18851887
dh.Table.EVENT_SORTCHANGED,
18861888
timeout

0 commit comments

Comments
 (0)