@metreeca/type - v0.1.1
    Preparing search index...

      @metreeca/type - v0.1.1

      Runtime structural type validation with composable guards.

      Provides factory functions for creating guards that validate unknown values against expected structures. Guards compose through conjunction and disjunction combinators, enabling validation of complex nested types. Validated objects are memoized and frozen for safe reuse.

      Assertions

      Functions that apply guards to validate values at runtime.

      is

      Creates a type predicate function from a guarding.

      as

      Creates a validating cast function from a guarding.

      Guards

      Factory functions that create guards for primitive and structural types.

      aNull

      A null guard factory.

      aBoolean

      A boolean guard factory.

      aNumber

      A number guard factory.

      aString

      A string guard factory.

      anArray

      An array guard factory.

      anObject

      An object guard factory.

      aFunction

      A function guard factory.

      anUnknown

      An unknown guard factory.

      Combinators

      Functions for building custom guards from predicates and composing guards.

      all

      Combines multiple guards into a conjunctive guard.

      any

      Creates a disjunctive guard from named guards.

      Type Aliases

      Guard

      A function that checks if a value conforms to type T.

      Guarded

      Extracts the guarded type from a guard factory, guard, or literal.

      Guarding

      A guard or a factory function returning it.

      Constant

      Literal types accepted as implicit guards in object schemas.

      Array

      A readonly array with elements of type T.

      Object

      A plain object with property values of type T.

      Entries

      Object properties resolved to their guarded types.

      Intersection

      The intersection of all types in a union.