Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Settings type with new fields #718

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

christian-byrne
Copy link
Collaborator

Some new settings are not included in Settings type.

I added all the missing fields that caused a validation error when apiTypes.zSettings was set to strict:

src/scripts/ui.ts(783,13): error TS2345: Argument of type '"Comfy.GroupSelectedNodes.Padding"' is not assignable to parameter of type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'.
src/stores/settingStore.ts(111,9): error TS2820: Type '"Comfy.NodeSearchBoxImpl.ShowIdName"' is not assignable to type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'. Did you mean '"Comfy.NodeSearchBoxImpl.ShowCategory"'?
src/stores/settingStore.ts(165,9): error TS2322: Type '"Comfy.Graph.CanvasInfo"' is not assignable to type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'.
src/stores/settingStore.ts(263,9): error TS2322: Type '"Comfy.GroupSelectedNodes.Padding"' is not assignable to type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'.
src/stores/settingStore.ts(281,9): error TS2820: Type '"Comfy.Group.DoubleClickTitleToEdit"' is not assignable to type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'. Did you mean '"Comfy.Node.DoubleClickTitleToEdit"'?
src/stores/settingStore.ts(295,9): error TS2322: Type '"Comfy.TreeExplorer.ItemPadding"' is not assignable to type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'.
src/stores/settingStore.ts(307,9): error TS2322: Type '"Comfy.Locale"' is not assignable to type 'optionalKeys<baseObjectOutputType<{ 'Comfy.ColorPalette': ZodString; 'Comfy.CustomColorPalettes': ZodRecord<ZodString, ZodObject<{ id: ZodString; name: ZodString; colors: ZodObject<{ node_slot: ZodObject<...>; litegraph_base: ZodObject<...>; comfy_base: ZodObject<...>; }, "passthrough", ZodTypeAny, objectOutputType<...'.

@huchenlei huchenlei merged commit a5d93f6 into Comfy-Org:main Sep 3, 2024
6 checks passed
@christian-byrne christian-byrne deleted the nodeid-setting-type branch September 3, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants