2.9 KiB
2.9 KiB
@theatre/dataverse / PointerProxy
Class: PointerProxy<O>
Allows creating pointer-prisms where the pointer can be switched out.
Remarks
This allows reacting not just to value changes at a certain pointer, but changes to the proxied pointer too.
Type parameters
Name | Type |
---|---|
O |
extends Object |
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new PointerProxy<O
>(currentPointer
)
Type parameters
Name | Type |
---|---|
O |
extends Object |
Parameters
Name | Type |
---|---|
currentPointer |
Pointer <O > |
Defined in
Properties
_currentPointerBox
• Private
Readonly
_currentPointerBox: Atom
<Pointer
<O
>>
Defined in
pointer
• Readonly
pointer: Pointer
<O
>
Convenience pointer pointing to the root of this PointerProxy.
Remarks
Allows convenient use of pointerToPrism and val.
Defined in
Methods
pointerToPrism
▸ pointerToPrism<P
>(pointer
): Prism
<P
>
Returns a prism of the value at the provided sub-path of the proxied pointer.
Type parameters
Name |
---|
P |
Parameters
Name | Type |
---|---|
pointer |
Pointer <P > |
Returns
Prism
<P
>
Implementation of
PointerToPrismProvider.pointerToPrism
Defined in
setPointer
▸ setPointer(p
): void
Sets the underlying pointer.
Parameters
Name | Type | Description |
---|---|---|
p |
Pointer <O > |
The pointer to be proxied. |
Returns
void