Skip to content

Value -> Value<T>

function Fusion.Value<T>(
    scope: Scope<unknown>,
    initialValue: T
) -> Value<T>

Constructs and returns a new value state object.

Use scoped() method syntax

This function is intended to be accessed as a method on a scope:

local computed = scope:Computed(processor)


Parameters

scope : Scope<S>

The scope which should be used to store destruction tasks for this object.

initialValue : T

The initial value that will be stored until the next value is :set().


Returns -> Value<T>

A freshly constructed value state object.


Learn More

Back to top