Skip to main content

Class: ProxiedPerformancePlanProperty<K>

Proxied MutableSubscribable that mirrors a property desired to be accessed by PerformancePlanProxy

Type parameters

NameType
Kextends keyof PerformancePlanData

Hierarchy

  • AbstractSubscribable<ValueType<K>>

    ProxiedPerformancePlanProperty

Implements

  • MutableSubscribable<ValueType<K> | null>

Constructors

constructor

new ProxiedPerformancePlanProperty<K>(key, proxy, editInPlace?): ProxiedPerformancePlanProperty<K>

Ctor

Type parameters

NameType
Kextends keyof PerformancePlanData

Parameters

NameTypeDefault valueDescription
keyKundefinedproperty key
proxyPerformancePlanProxyundefinedthe proxy this property belongs to
editInPlacebooleanfalsewhether the property can be edited without a new flight plan being created

Returns

ProxiedPerformancePlanProperty<K>

Overrides

AbstractSubscribable\<ValueType\<K\>\>.constructor

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:37

Properties

editInPlace

Readonly editInPlace: boolean = false

whether the property can be edited without a new flight plan being created

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:40


initialNotifyFunc

Protected Readonly initialNotifyFunc: (sub: HandlerSubscription<(v: ValueType<K>) => void>) => void

A function which sends initial notifications to subscriptions.

Type declaration

▸ (sub): void

A function which sends initial notifications to subscriptions.

Parameters
NameType
subHandlerSubscription<(v: ValueType<K>) => void>
Returns

void

Inherited from

AbstractSubscribable.initialNotifyFunc

Defined in

sdk/sub/AbstractSubscribable.ts:26


isMutableSubscribable

Readonly isMutableSubscribable: true

Implementation of

MutableSubscribable.isMutableSubscribable

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:26


isSubscribable

Readonly isSubscribable: true

Implementation of

MutableSubscribable.isSubscribable

Overrides

AbstractSubscribable.isSubscribable

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:24


key

key: K

property key

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:38


notifyDepth

Protected notifyDepth: number = 0

Inherited from

AbstractSubscribable.notifyDepth

Defined in

sdk/sub/AbstractSubscribable.ts:23


onSubDestroyedFunc

Protected Readonly onSubDestroyedFunc: (sub: HandlerSubscription<(v: ValueType<K>) => void>) => void

A function which responds to when a subscription to this subscribable is destroyed.

Type declaration

▸ (sub): void

A function which responds to when a subscription to this subscribable is destroyed.

Parameters
NameType
subHandlerSubscription<(v: ValueType<K>) => void>
Returns

void

Inherited from

AbstractSubscribable.onSubDestroyedFunc

Defined in

sdk/sub/AbstractSubscribable.ts:29


singletonSub

Protected Optional singletonSub: HandlerSubscription<(v: ValueType<K>) => void>

Inherited from

AbstractSubscribable.singletonSub

Defined in

sdk/sub/AbstractSubscribable.ts:20


subs

Protected Optional subs: HandlerSubscription<(v: ValueType<K>) => void>[]

Inherited from

AbstractSubscribable.subs

Defined in

sdk/sub/AbstractSubscribable.ts:22

Methods

addSubscription

addSubscription(sub): void

Adds a subscription to this subscribable.

Parameters

NameTypeDescription
subHandlerSubscription<(v: ValueType<K>) => void>The subscription to add.

Returns

void

Inherited from

AbstractSubscribable.addSubscription

Defined in

sdk/sub/AbstractSubscribable.ts:35


get

get(): null | ValueType<K>

Returns

null | ValueType<K>

Inherit Doc

Implementation of

MutableSubscribable.get

Overrides

AbstractSubscribable.get

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:91


map

map<M>(fn, equalityFunc?): MappedSubscribable<M>

Maps this subscribable to a new subscribable.

Type parameters

Name
M

Parameters

NameTypeDescription
fn(input: ValueType<K>, previousVal?: M) => MThe function to use to map to the new subscribable.
equalityFunc?(a: M, b: M) => booleanThe function to use to check for equality between mapped values. Defaults to the strict equality comparison (===).

Returns

MappedSubscribable<M>

The mapped subscribable.

Implementation of

MutableSubscribable.map

Inherited from

AbstractSubscribable.map

Defined in

sdk/sub/AbstractSubscribable.ts:186

map<M>(fn, equalityFunc, mutateFunc, initialVal): MappedSubscribable<M>

Maps this subscribable to a new subscribable with a persistent, cached value which is mutated when it changes.

Type parameters

Name
M

Parameters

NameTypeDescription
fn(input: ValueType<K>, previousVal?: M) => MThe function to use to map to the new subscribable.
equalityFunc(a: M, b: M) => booleanThe function to use to check for equality between mapped values.
mutateFunc(oldVal: M, newVal: M) => voidThe function to use to change the value of the mapped subscribable.
initialValMThe initial value of the mapped subscribable.

Returns

MappedSubscribable<M>

The mapped subscribable.

Implementation of

MutableSubscribable.map

Inherited from

AbstractSubscribable.map

Defined in

sdk/sub/AbstractSubscribable.ts:195


notify

notify(): void

Notifies subscriptions that this subscribable's value has changed.

Returns

void

Inherited from

AbstractSubscribable.notify

Defined in

sdk/sub/AbstractSubscribable.ts:80


notifySubscription

notifySubscription(sub): void

Notifies a subscription of this subscribable's current state.

Parameters

NameTypeDescription
subHandlerSubscription<(v: ValueType<K>) => void>The subscription to notify.

Returns

void

Inherited from

AbstractSubscribable.notifySubscription

Defined in

sdk/sub/AbstractSubscribable.ts:156


onSubDestroyed

onSubDestroyed(sub): void

Responds to when a subscription to this subscribable is destroyed.

Parameters

NameTypeDescription
subHandlerSubscription<(v: ValueType<K>) => void>The destroyed subscription.

Returns

void

Inherited from

AbstractSubscribable.onSubDestroyed

Defined in

sdk/sub/AbstractSubscribable.ts:164


pipe

pipe(to, paused?): Subscription

Subscribes to and pipes this subscribable's state to a mutable subscribable. Whenever an update of this subscribable's state is received through the subscription, it will be used as an input to change the other subscribable's state.

Parameters

NameTypeDescription
toMutableSubscribable<any, ValueType<K>>The mutable subscribable to which to pipe this subscribable's state.
paused?booleanWhether the new subscription should be initialized as paused. Defaults to false.

Returns

Subscription

The new subscription.

Implementation of

MutableSubscribable.pipe

Inherited from

AbstractSubscribable.pipe

Defined in

sdk/sub/AbstractSubscribable.ts:219

pipe<M>(to, map, paused?): Subscription

Subscribes to this subscribable's state and pipes a mapped version to a mutable subscribable. Whenever an update of this subscribable's state is received through the subscription, it will be transformed by the specified mapping function, and the transformed state will be used as an input to change the other subscribable's state.

Type parameters

Name
M

Parameters

NameTypeDescription
toMutableSubscribable<any, M>The mutable subscribable to which to pipe this subscribable's mapped state.
map(fromVal: ValueType<K>, toVal: M) => MThe function to use to transform inputs.
paused?booleanWhether the new subscription should be initialized as paused. Defaults to false.

Returns

Subscription

The new subscription.

Implementation of

MutableSubscribable.pipe

Inherited from

AbstractSubscribable.pipe

Defined in

sdk/sub/AbstractSubscribable.ts:229


resetToDefault

resetToDefault(): void

Resets the property to its default value according to the default values performance plan

Returns

void

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:80


set

set(value): void

Parameters

NameType
valueValueType<K>

Returns

void

Inherit Doc

Implementation of

MutableSubscribable.set

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:100


sub

sub(handler, initialNotify?, paused?): Subscription

Parameters

NameType
handler(value: ValueType<K>) => void
initialNotify?boolean
paused?boolean

Returns

Subscription

Inherit Doc

Implementation of

MutableSubscribable.sub

Overrides

AbstractSubscribable.sub

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:113


switchToPlan

switchToPlan(plan): void

Switches the target plan

Parameters

NameTypeDescription
planPerformancePlanthe new target plan

Returns

void

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:52


unsub

unsub(handler): void

Parameters

NameType
handler(value: ValueType<K>) => void

Returns

void

Inherit Doc

Implementation of

MutableSubscribable.unsub

Overrides

AbstractSubscribable.unsub

Defined in

workingtitle-instruments-wt21/shared/Performance/ProxiedPerformancePlanProperty.ts:118


DEFAULT_EQUALITY_FUNC

DEFAULT_EQUALITY_FUNC(a, b): boolean

Checks if two values are equal using the strict equality operator.

Parameters

NameTypeDescription
aanyThe first value.
banyThe second value.

Returns

boolean

whether a and b are equal.

Inherited from

AbstractSubscribable.DEFAULT_EQUALITY_FUNC

Defined in

sdk/sub/AbstractSubscribable.ts:18