Value.ReplaceType

Syntax

Value.ReplaceType(value as any, type as type) as any

About

Replaces the value's type with the provided type.

Example 1

Replace the default type of a record with a more specific type.

Usage

Type.RecordFields(
    Value.Type(
        Value.ReplaceType(
            [Column1 = 123],
            type [Column1 = number]
        )
    )
)[Column1][Type]

Output

type number