Comfy-Org / Comfy-Org/ComfyUI_frontend

Remove Object.assign in node input / output slot classes

Open
#4,699 0 comments 0 reactions 0 assignees View on GitHub
area:litegraph developer experience
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

This pattern was implemented around 6 months ago, allowing inputs / outputs to be recreated as concrete classes without breaking extensions.

- Ref: Comfy-Org/litegraph.js#476

Unfortunately, it is also extremely brittle, and bypasses type checking. Any enumerable properties not explicitly excluded are simply copied to the new concrete object without any validation.

N.B. New code must handle properties correctly, rather than rely on this workaround.

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-4699-Remove-Object-assign-in-node-input-output-slot-classes-2476d73d365081f0a575ea5bea6c1e1c) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.