Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/arktype/utils/chainableNoOpProxy.ts>chainableNoOpProxy

TypeScript's 1:1 validator, optimized from editor to runtime
Latest
variable chainableNoOpProxy
import { chainableNoOpProxy } from "https://deno.land/x/arktype@v1.0.10-alpha/utils/chainableNoOpProxy.ts";

Can be used to allow arbitrarily chained property access and function calls. This is useful for expressions whose meaning is not attached to a value, e.g. to allow the extraction of types using typeof without depending on the existence of a real object that conforms to that type's structure:

Examples

const myType: MyType = chainableNoOpProxy

// The following types are equivalent type ExtractedType = typeof myType.a.b.c type DirectlyExtractedType = MyType["a"]["b"]["c"]

type

any