mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 23:09:39 +00:00
[API] Add improved slot locator functions (#716)
- Returns object with slot, index, and pos - Locate-by-type returns object with slot & index - Uses standard `undefined` return for concise chaining & validation - Free 10x perf increase over getConnectionPos (used basic random data to test, out of curiosity)
This commit is contained in:
@@ -217,6 +217,11 @@ export interface IOptionalSlotData<TSlot extends INodeInputSlot | INodeOutputSlo
|
||||
className?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* A string that represents a specific data / slot type, e.g. `STRING`.
|
||||
*
|
||||
* Can be comma-delimited to specify multiple allowed types, e.g. `STRING,INT`.
|
||||
*/
|
||||
export type ISlotType = number | string
|
||||
|
||||
export interface INodeSlot {
|
||||
|
||||
Reference in New Issue
Block a user