Skip to content

Commit a5b9db4

Browse files
Copilothotlong
andcommitted
fix: resolve all CI build errors (TS2339, TS2769, TS2307, TS7006, TS2322)
- Fix createKernel.ts: cast result to any for _id property access - Fix ObjectAgGridImpl.tsx: use DefaultMenuItem type for ag-grid context menu - Fix plugin-ai: type annotations + tsconfig/dependency fixes - Fix plugin-workflow: type annotations + dependency fixes - Fix NLQueryInput.tsx: convert unknown to string for ReactNode rendering Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 9523215 commit a5b9db4

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

apps/console/src/mocks/createKernel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function patchDriverCreate(driver: InMemoryDriver): void {
133133
}
134134
}
135135
// Also patch the returned copy
136-
if (!result._id) result._id = result.id;
136+
if (!(result as any)._id) (result as any)._id = result.id;
137137
return result;
138138
};
139139
}

packages/plugin-aggrid/src/ObjectAgGridImpl.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type {
1818
StatusPanelDef,
1919
GetContextMenuItemsParams,
2020
MenuItemDef,
21+
DefaultMenuItem,
2122
} from 'ag-grid-community';
2223
import type { FieldMetadata, ObjectSchemaMetadata } from '@object-ui/types';
2324
import type { ObjectAgGridImplProps } from './object-aggrid.types';
@@ -215,10 +216,10 @@ export default function ObjectAgGridImpl({
215216
}, [exportConfig, callbacks, rowData, objectName]);
216217

217218
// Context Menu handler
218-
const getContextMenuItems = useCallback((params: GetContextMenuItemsParams): (string | MenuItemDef)[] => {
219+
const getContextMenuItems = useCallback((params: GetContextMenuItemsParams): (DefaultMenuItem | MenuItemDef)[] => {
219220
if (!contextMenu?.enabled) return [];
220221

221-
const items: (string | MenuItemDef)[] = [];
222+
const items: (DefaultMenuItem | MenuItemDef)[] = [];
222223
const defaultItems = contextMenu.items || ['copy', 'copyWithHeaders', 'separator', 'export'];
223224

224225
defaultItems.forEach(item => {
@@ -247,7 +248,7 @@ export default function ObjectAgGridImpl({
247248
},
248249
});
249250
} else {
250-
items.push(item);
251+
items.push(item as DefaultMenuItem);
251252
}
252253
});
253254

packages/plugin-ai/src/NLQueryInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export const NLQueryInput: React.FC<NLQueryInputProps> = ({ schema, onSubmit: on
159159
<tr key={rowIdx} className="border-t">
160160
{result.columns!.map((col: { name: string; label?: string; type?: string }, colIdx: number) => (
161161
<td key={colIdx} className="px-4 py-2">
162-
{row[col.name]}
162+
{String(row[col.name] ?? '')}
163163
</td>
164164
))}
165165
</tr>

packages/plugin-workflow/src/ApprovalProcess.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const ApprovalProcess: React.FC<ApprovalProcessProps> = ({ schema }) => {
110110
</Label>
111111
<Input
112112
value={comment}
113-
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setComment(e.target.value)}}
113+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setComment(e.target.value)}
114114
placeholder="Add a comment (optional)"
115115
/>
116116
</div>

0 commit comments

Comments
 (0)