Skip to main content

Class: DataInterface<T, U>

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcDataBinding.ts:6

A structure representing a source of named data that can be modified

Type Parameters​

Type ParameterDefault type
T-
UT

Constructors​

Constructor​

new DataInterface<T, U>(input, modify): DataInterface<T, U>

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcDataBinding.ts:14

Constructs a new ModifiableDataSource

Parameters​

ParameterTypeDescription
inputSubscribable<T> | Consumer<T>an input for data
modify(value) => voida callback when the data needs to be modified

Returns​

DataInterface<T, U>

Properties​

input​

readonly input: Subscribable<T> | Consumer<T>

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcDataBinding.ts:15

an input for data


modify()​

modify: (value) => void

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcDataBinding.ts:16

a callback when the data needs to be modified

Parameters​

ParameterType
valueU

Returns​

void

Methods​

fromMutSubscribable()​

static fromMutSubscribable<T>(sub): DataInterface<T>

Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21v2/FMC/Framework/FmcDataBinding.ts:25

Creates a DataInterface from a MutableSubscribable

Type Parameters​

Type Parameter
T

Parameters​

ParameterTypeDescription
subMutableSubscribable<T>the MutableSubscribable to bind to

Returns​

DataInterface<T>

the DataInterface