Skip to content

Commit c416618

Browse files
committed
refactor(app-shell): type the record navigation hook's parameters from their sources
activeView, objectDef and objects were written as `any` in the new hook's parameter type. They now name where the component gets each value: the element of buildViewTabs' result, and ConsoleObjectViewProps['objects'] and its element. No new no-explicit-any warning; the moved bodies are unchanged. Claude-Session: https://claude.ai/code/session_01QciHBvFJXnhZqXmdqpDtpz Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3fd6606 commit c416618

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎ui/packages/app-shell/src/views/objectViewRecordNavigation.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import { viewTabLabel } from './viewTabLabel.js';
1616
import { listRecordDetailUrl, listRecordActionsValue } from './objectViewRecordLinks.js';
1717
import type { useServedViewItems } from '../hooks/useServedViewItems.js';
1818
import type { useObjectLabel, useObjectTranslation } from '@object-ui/i18n';
19+
import type { buildViewTabs } from './objectViewTabs.js';
20+
import type { ConsoleObjectViewProps } from './ObjectView.js';
1921

2022
export function useObjectViewRecordNavigation({
2123
activeView,
@@ -33,9 +35,9 @@ export function useObjectViewRecordNavigation({
3335
unlabelledViewText,
3436
language,
3537
}: {
36-
activeView: any;
37-
objectDef: any;
38-
objects: any[];
38+
activeView: ReturnType<typeof buildViewTabs>[number];
39+
objectDef: ConsoleObjectViewProps['objects'][number];
40+
objects: ConsoleObjectViewProps['objects'];
3941
appName: string | undefined;
4042
viewId: string | undefined;
4143
searchParams: URLSearchParams;

0 commit comments

Comments
 (0)