Class: DataInterface<T, U>
Defined in: src/sdk/fmc/FmcDataBinding.ts:7
A structure representing a source of named data that can be modified
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
U | T |
Constructors
Constructor
new DataInterface<
T
,U
>(input
,modify
):DataInterface
<T
,U
>
Defined in: src/sdk/fmc/FmcDataBinding.ts:15
Constructs a new DataInterface
Parameters
Parameter | Type | Description |
---|---|---|
input | Subscribable <T > | Consumer <T > | an input for data |
modify | (value ) => void | a callback when the data needs to be modified |
Returns
DataInterface
<T
, U
>
Properties
input
readonly
input:Subscribable
<T
> |Consumer
<T
>
Defined in: src/sdk/fmc/FmcDataBinding.ts:16
an input for data
modify()
modify: (
value
) =>void
Defined in: src/sdk/fmc/FmcDataBinding.ts:17
a callback when the data needs to be modified
Parameters
Parameter | Type |
---|---|
value | U |
Returns
void
Methods
fromConsumer()
static
fromConsumer<T
,U
>(consumer
,modifier
):DataInterface
<T
,U
>
Defined in: src/sdk/fmc/FmcDataBinding.ts:36
Creates a DataInterface from a Consumer
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
U | T |
Parameters
Parameter | Type | Description |
---|---|---|
consumer | Consumer <T > | the Consumer to bind to (get) |
modifier | (value ) => void | the modifier to use when the value is modified (set) |
Returns
DataInterface
<T
, U
>
the DataInterface
fromMutSubscribable()
static
fromMutSubscribable<T
,U
>(sub
):DataInterface
<T
,U
>
Defined in: src/sdk/fmc/FmcDataBinding.ts:26
Creates a DataInterface from a MutableSubscribable
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
U | T |
Parameters
Parameter | Type | Description |
---|---|---|
sub | MutableSubscribable <T , U > | the MutableSubscribable to bind to |
Returns
DataInterface
<T
, U
>
the DataInterface