CollectionBindToChain
interface
Type parameters
-
S -
T
Methods
-
as( Class ) → voidmodule:utils/collection~CollectionBindToChain#asCreates the class factory binding in which items of the source collection are passed to the constructor of the specified class.
Parameters
Class : new ( item: S ) => TThe class constructor used to create instances in the factory.
Returns
void
-
using( callbackOrProperty ) → voidmodule:utils/collection~CollectionBindToChain#usingCreates a callback or a property binding.
Parameters
callbackOrProperty : keyof S | ( item: S ) => ( null | T )When the function is passed, it should return the collection items. When the string is provided, the property value is used to create the bound collection items.
Returns
void