@adviser/cement - v0.0.0
    Preparing search index...

    Type Alias WritableValue<T>

    WritableValue: Omit<T, "value"> & {
        value: T extends { value: infer V } ? V : unknown;
    }

    Utility type that makes the 'value' property of a type writable.

    This is useful for internal implementations that need to construct items with initially undefined values that are later populated.

    Type Parameters

    • T

      The type to make writable

    type ReadOnly = { readonly value: number };
    type Writable = WritableValue<ReadOnly>;
    // Result: { value: number }