Class: LinksStore
Constructors
constructor
• new LinksStore(rootStore
)
Parameters
Name | Type |
---|---|
rootStore | RootStore |
Accessors
linkCreation
• get
linkCreation(): LinkCreationState
Returns
links
• get
links(): ReadonlyMap
<string
, LinkState
>
Returns
ReadonlyMap
<string
, LinkState
>
Methods
addLink
▸ addLink(link
, rewriteIfAlreadyConnected?
): SuccessOrErrorResult
<LinkState
, ILinkState
>
Parameters
Name | Type | Default value |
---|---|---|
link | ILinkState | undefined |
rewriteIfAlreadyConnected | boolean | false |
Returns
SuccessOrErrorResult
<LinkState
, ILinkState
>
addLinks
▸ addLinks(links
, rewriteIfAlreadyConnected?
): SuccessOrErrorResult
<LinkState
, ILinkState
>[]
Parameters
Name | Type | Default value |
---|---|---|
links | ILinkState [] | undefined |
rewriteIfAlreadyConnected | boolean | false |
Returns
SuccessOrErrorResult
<LinkState
, ILinkState
>[]
areEndpointsConnected
▸ areEndpointsConnected(source
, target
): boolean
Parameters
Name | Type |
---|---|
source | ILinkPortEndpoint |
target | ILinkPortEndpoint |
Returns
boolean
export
▸ export(): ILinkState
[]
Returns
getEndpointPort
▸ getEndpointPort(endpoint
): undefined
| PortState
Parameters
Name | Type |
---|---|
endpoint | ILinkPortEndpoint |
Returns
undefined
| PortState
getEndpointPortOrError
▸ getEndpointPortOrError(endpoint
): SuccessOrErrorResult
<PortState
, undefined
>
Parameters
Name | Type |
---|---|
endpoint | ILinkPortEndpoint |
Returns
SuccessOrErrorResult
<PortState
, undefined
>
getLink
▸ getLink(id
): undefined
| LinkState
Parameters
Name | Type |
---|---|
id | string |
Returns
undefined
| LinkState
getLinkForEndpointsIfExists
▸ getLinkForEndpointsIfExists(source
, target
): undefined
| LinkState
Parameters
Name | Type |
---|---|
source | ILinkPortEndpoint |
target | ILinkPortEndpoint |
Returns
undefined
| LinkState
getNodeLinks
▸ getNodeLinks(nodeId
): LinkState
[]
Parameters
Name | Type |
---|---|
nodeId | string |
Returns
getPortLinks
▸ getPortLinks(nodeId
, portId
): LinkState
[]
Parameters
Name | Type |
---|---|
nodeId | string |
portId | string |
Returns
import
▸ import(newLinks?
): void
Parameters
Name | Type |
---|---|
newLinks? | ILinkState [] |
Returns
void
removeLink
▸ removeLink(linkId
): undefined
| ILinkStateWithId
Parameters
Name | Type |
---|---|
linkId | string |
Returns
undefined
| ILinkStateWithId
removeLinks
▸ removeLinks(linkIds
): SuccessOrErrorResult
<ILinkStateWithId
, string
>[]
Parameters
Name | Type |
---|---|
linkIds | string [] |
Returns
SuccessOrErrorResult
<ILinkStateWithId
, string
>[]
removeNodeLinks
▸ removeNodeLinks(nodeId
): void
Parameters
Name | Type |
---|---|
nodeId | string |
Returns
void
removePortLinks
▸ removePortLinks(nodeId
, portId
): void
Parameters
Name | Type |
---|---|
nodeId | string |
portId | string |
Returns
void
validateLink
▸ validateLink(link
, ignoreIfAlreadyConnected?
): SuccessOrErrorResult
<undefined
, undefined
>
Parameters
Name | Type | Default value |
---|---|---|
link | ILinkState | undefined |
ignoreIfAlreadyConnected | boolean | false |
Returns
SuccessOrErrorResult
<undefined
, undefined
>
validateLinkProperties
▸ validateLinkProperties(link
, ignoreIfAlreadyConnected?
): SuccessOrErrorResult
<undefined
, undefined
>
Parameters
Name | Type | Default value |
---|---|---|
link | ILinkState | undefined |
ignoreIfAlreadyConnected | boolean | false |
Returns
SuccessOrErrorResult
<undefined
, undefined
>