Library API
    Preparing search index...

    Function asType

    • Wraps a value in a TypeValue object containing both its determined type and the original value.

      Type Parameters

      • T

      Parameters

      • Optionalvalue: T

        The value to wrap

      • ...instances: Instance[]

        Optional list of additional custom instances to check against for typing

      Returns TypeValue<T>

      A TypeValue wrapper object

      const wrapper = asType('hello'); // { type: 'String', value: 'hello' }