Skip to content

Home > @unseenco/backstage-dataverse > Atom > pointerToPrism

Atom.pointerToPrism() method

Returns a new prism of the value at the provided path.

Signature:

typescript
pointerToPrism<P>(pointer: Pointer<P>): Prism<P>;

Parameters

ParameterTypeDescription
pointer[Pointer](./backstage-dataverse.pointer.md)<!-- -->&lt;P&gt;

The path to create the prism at.

ts
const pr = atom({ a: { b: 1 } }).pointerToPrism(atom.pointer.a.b)
pr.getValue() // 1

|

Returns:

Prism<P>