Skip to content

Commit e8b74ce

Browse files
committed
wip(components): renderer inline props index signature any -> unknown (mechanical, breaks pending)
Claude-Session: https://claude.ai/code/session_01GJjkZ6pmdwWoDYH8fE8FAn Co-authored-by: Claude <noreply@anthropic.com>
1 parent 90d17ef commit e8b74ce

74 files changed

Lines changed: 79 additions & 79 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎ui/packages/components/src/renderers/action/action-bar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function useActionsLabel(): string {
9494
// exported and never appears in JSX, and `Registry.register` takes
9595
// `ComponentRenderer<T = any> = T`.
9696
const ActionBarRenderer = forwardRef<HTMLDivElement, { schema: ActionBarSchema; className?: string }>(
97-
({ schema, className, ...props }: { schema: ActionBarSchema; className?: string; [key: string]: any }, ref) => {
97+
({ schema, className, ...props }: { schema: ActionBarSchema; className?: string; [key: string]: unknown }, ref) => {
9898
const actionsAriaLabel = useActionsLabel();
9999
const {
100100
'data-obj-id': dataObjId,

‎ui/packages/components/src/renderers/action/action-button.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export interface ActionButtonRendererProps {
110110
* therefore never reaches the DOM spread — see the destructure.
111111
*/
112112
disabled?: boolean;
113-
[key: string]: any;
113+
[key: string]: unknown;
114114
}
115115

116116
// `PropsWithoutRef` would collapse `ActionButtonRendererProps` to its bare index

‎ui/packages/components/src/renderers/action/action-group.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface ActionGroupSchema {
6666
size?: string;
6767
/** Custom CSS class */
6868
className?: string;
69-
[key: string]: any;
69+
[key: string]: unknown;
7070
}
7171

7272
/**
@@ -275,7 +275,7 @@ DropdownActionItem.displayName = 'DropdownActionItem';
275275
// host-EVALUATED enablement verdict, declared rather than left to the index
276276
// signature, as `ActionButtonRendererProps` declares it (objectui#9131).
277277
const ActionGroupRenderer = forwardRef<HTMLDivElement, { schema: ActionGroupSchema; className?: string }>(
278-
({ schema, className, ...props }: { schema: ActionGroupSchema; className?: string; disabled?: boolean; [key: string]: any }, ref) => {
278+
({ schema, className, ...props }: { schema: ActionGroupSchema; className?: string; disabled?: boolean; [key: string]: unknown }, ref) => {
279279
const {
280280
'data-obj-id': dataObjId,
281281
'data-obj-type': dataObjType,

‎ui/packages/components/src/renderers/action/action-icon.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export interface ActionIconRendererProps {
5454
* signature, consumed by name below, never re-spread onto the DOM.
5555
*/
5656
disabled?: boolean;
57-
[key: string]: any;
57+
[key: string]: unknown;
5858
}
5959

6060
// Index signature on the parameter annotation, not on the `forwardRef` type

‎ui/packages/components/src/renderers/action/action-menu.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export interface ActionMenuSchema {
6161
visible?: boolean | string | { dialect: string; source?: string };
6262
/** Custom CSS class */
6363
className?: string;
64-
[key: string]: any;
64+
[key: string]: unknown;
6565
}
6666

6767
/**
@@ -207,7 +207,7 @@ ActionAutoTrigger.displayName = 'ActionAutoTrigger';
207207
// host-EVALUATED enablement verdict, declared rather than left to the index
208208
// signature, as `ActionButtonRendererProps` declares it (objectui#9131).
209209
const ActionMenuRenderer = forwardRef<HTMLButtonElement, { schema: ActionMenuSchema; className?: string }>(
210-
({ schema, className, ...props }: { schema: ActionMenuSchema; className?: string; disabled?: boolean; [key: string]: any }, ref) => {
210+
({ schema, className, ...props }: { schema: ActionMenuSchema; className?: string; disabled?: boolean; [key: string]: unknown }, ref) => {
211211
const {
212212
'data-obj-id': dataObjId,
213213
'data-obj-type': dataObjType,

‎ui/packages/components/src/renderers/basic/button-group.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Button } from '../../ui';
1212
import { cn } from '../../lib/utils';
1313

1414
ComponentRegistry.register('button-group',
15-
({ schema, ...props }: { schema: ButtonGroupSchema; [key: string]: any }) => {
15+
({ schema, ...props }: { schema: ButtonGroupSchema; [key: string]: unknown }) => {
1616
const {
1717
'data-obj-id': dataObjId,
1818
'data-obj-type': dataObjType,

‎ui/packages/components/src/renderers/basic/div.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const DIV_DEPRECATION_NOTICE =
128128
// argument — mechanism note on `action:bar` (objectui#4422), pinned by
129129
// `__tests__/forwardref-props-annotation.guard.test.ts`.
130130
const DivRenderer = forwardRef<HTMLDivElement, { schema: DivSchema; className?: string }>(
131-
({ schema, className, ...props }: { schema: DivSchema; className?: string; [key: string]: any }, ref) => {
131+
({ schema, className, ...props }: { schema: DivSchema; className?: string; [key: string]: unknown }, ref) => {
132132
// Deprecation notice, once per module load (objectui#3965, see
133133
// warnDeprecatedOnce). There is no provenance exemption any more: the
134134
// declaration below names both authoring surfaces (objectui#10757), so a

‎ui/packages/components/src/renderers/basic/html-elements.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { renderChildren } from '../../lib/utils';
3131
import { createElement, forwardRef, useContext } from 'react';
3232
import type { MouseEventHandler } from 'react';
3333

34-
type AnyProps = { schema: any; className?: string; [key: string]: any };
34+
type AnyProps = { schema: any; className?: string; [key: string]: unknown };
3535

3636
// Tags that take no children.
3737
const VOID_TAGS = new Set(['img', 'hr', 'br']);

‎ui/packages/components/src/renderers/basic/icon.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ import { describeIconLookup, resolveIcon } from '../action/resolve-icon';
108108
// argument — mechanism note on `action:bar` (objectui#4422), pinned by
109109
// `__tests__/forwardref-props-annotation.guard.test.ts`.
110110
const IconRenderer = forwardRef<SVGSVGElement, { schema: IconSchema; className?: string }>(
111-
({ schema, className, ...props }: { schema: IconSchema; className?: string; [key: string]: any }, ref) => {
111+
({ schema, className, ...props }: { schema: IconSchema; className?: string; [key: string]: unknown }, ref) => {
112112
// Extract designer-related props
113113
const {
114114
'data-obj-id': dataObjId,

‎ui/packages/components/src/renderers/basic/image.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ComponentRegistry } from '@object-ui/core';
1010
import type { ImageSchema } from '@object-ui/types';
1111

1212
ComponentRegistry.register('image',
13-
({ schema, className, ...props }: { schema: ImageSchema; className?: string; [key: string]: any }) => {
13+
({ schema, className, ...props }: { schema: ImageSchema; className?: string; [key: string]: unknown }) => {
1414
// Extract designer-related props
1515
const {
1616
'data-obj-id': dataObjId,

0 commit comments

Comments
 (0)