type

Links

@Js
const mixin Links : Dict

Links models the incoming links of a component. It is a dict keyed by the toSlot name.

methods

add

Add given link (if not duplicate) and return new instance of Links

eachLink

Iterate all the links as flat list

isLinked

Return if given toSlot has one or more links

listOn

List all the links with the given toSlot name

remove

Remove given link (if found) and return new instance of Links

Slot Details

add

abstract This add(Str toSlot, Link link)

Add given link (if not duplicate) and return new instance of Links

abstract Void eachLink(|Str,Link| f)

Iterate all the links as flat list

isLinked

abstract Bool isLinked(Str toSlot)

Return if given toSlot has one or more links

listOn

abstract Link[] listOn(Str toSlot)

List all the links with the given toSlot name

remove

abstract This remove(Str toSlot, Link link)

Remove given link (if found) and return new instance of Links