Interface

CollectionBindToChain (utils)

@ckeditor/ckeditor5-utils/src/collection

interface

An object returned by the bindTo() method providing functions that specify the type of the binding.

See the bindTo() documentation for examples.

Filtering

Type parameters

Methods

  • as( Class ) → void

    Creates the class factory binding in which items of the source collection are passed to the constructor of the specified class.

    Parameters

    Class : new ( S ) => T

    The class constructor used to create instances in the factory.

    Returns

    void
  • using( callbackOrProperty ) → void

    Creates a callback or a property binding.

    Parameters

    callbackOrProperty : keyof S | ( 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