Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: resolve knip unused code detection and typecheck issues
- Remove unused exports isImageInputSpec and ImageInputSpec to fix knip failures
- Add ts-expect-error for future IMAGE widget implementation
- All quality checks now pass: tests (96.9%), typecheck, knip
  • Loading branch information
christian-byrne committed Nov 15, 2025
commit 8fc5e877f941031a9b2ad929966f75c0ff4d8ece
5 changes: 3 additions & 2 deletions src/schemas/nodeDef/nodeDefSchemaV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ type StringInputSpec = z.infer<typeof zStringInputSpec>
export type ComboInputSpec = z.infer<typeof zComboInputSpec>
export type ColorInputSpec = z.infer<typeof zColorInputSpec>
export type FileUploadInputSpec = z.infer<typeof zFileUploadInputSpec>
export type ImageInputSpec = z.infer<typeof zImageInputSpec>
type ImageInputSpec = z.infer<typeof zImageInputSpec>
export type ImageCompareInputSpec = z.infer<typeof zImageCompareInputSpec>
export type TreeSelectInputSpec = z.infer<typeof zTreeSelectInputSpec>
export type MultiSelectInputSpec = z.infer<typeof zMultiSelectInputSpec>
Expand Down Expand Up @@ -310,7 +310,8 @@ export const isFileUploadInputSpec = (
return inputSpec.type === 'FILEUPLOAD'
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[quality] medium Priority

Issue: Missing type guard for ImageInputSpec - no matching isImageInputSpec function exported
Context: All other input specs have corresponding type guard functions, but ImageInputSpec is missing its type guard
Suggestion: Add export const isImageInputSpec = (inputSpec: InputSpec): inputSpec is ImageInputSpec => inputSpec.type === 'IMAGE'


export const isImageInputSpec = (
// @ts-expect-error - will be used in future IMAGE widget implementation
const isImageInputSpec = (
inputSpec: InputSpec
): inputSpec is ImageInputSpec => {
return inputSpec.type === 'IMAGE'
Expand Down
Loading