Function defineType

Creates a TypeDef wrapper for a given type.

const stringType = defineType<string>()
const envDataType = defineType<{ env: Record<string, string> }>()
  • Type Parameters

    • T = never

      The type to wrap (defaults to never)

    Returns TypeDef<T>

    A TypeDef instance wrapping the specified type