[API] Add LLink.resolve static / instance methods (#974)

- `LLink.resolve`: Resolves all IDs on the link to their respective
objects (node IDs, slot indexes)
- `LinkNetwork.getLink`: a more concise pattern to resolve links
This commit is contained in:
filtered
2025-04-27 06:51:41 +10:00
committed by GitHub
parent 8e8818c24d
commit b3d030e36b
3 changed files with 70 additions and 1 deletions

View File

@@ -127,6 +127,8 @@ export interface ReadonlyLinkNetwork {
readonly reroutes: ReadonlyMap<RerouteId, Reroute>
readonly floatingLinks: ReadonlyMap<LinkId, LLink>
getNodeById(id: NodeId | null | undefined): LGraphNode | null
getLink(id: null | undefined): undefined
getLink(id: LinkId | null | undefined): LLink | undefined
getReroute(parentId: null | undefined): undefined
getReroute(parentId: RerouteId | null | undefined): Reroute | undefined
}