[TS] Type various WidgetOption props (#3010)

This commit is contained in:
Chenlei Hu
2025-03-12 14:44:50 -04:00
committed by GitHub
parent d133aeb614
commit e1e8fcf62c
2 changed files with 13 additions and 1 deletions

View File

@@ -20,7 +20,6 @@ const zMultiSelectOption = z.object({
export const zBaseInputOptions = z
.object({
default: z.any().optional(),
/** @deprecated Group node uses this field. Remove when group node feature is removed. */
defaultInput: z.boolean().optional(),
forceInput: z.boolean().optional(),
tooltip: z.string().optional(),

View File

@@ -26,6 +26,19 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
* The minimum size of the node if the widget is present.
*/
minNodeSize?: Size
/**
* Whether the widget is optional.
*/
inputIsOptional?: boolean
/**
* Whether the widget is forced to be an input.
*/
forceInput?: boolean
/**
* Whether the widget defaults to input state. Can still be converted back
* to widget state.
*/
defaultInput?: boolean
}
interface IBaseWidget {