@blwat/utils - v0.1.0-alpha.2
    Preparing search index...

    Interface DiscriminatorRegistration

    A registration for a discriminator to the DiscriminatorRegistry.

    0.1.0

    interface DiscriminatorRegistration {
        discriminator: string;
        validator: (input: unknown) => boolean;
    }
    Index

    Properties

    discriminator: string

    The discriminator value that identifies the type of a Discriminated object. This value must be unique across all registered discriminators.

    0.1.0

    validator: (input: unknown) => boolean

    A method that validates whether an input matches the type associated with the discriminator.

    Type Declaration

      • (input: unknown): boolean
      • Parameters

        • input: unknown

          The input to validate.

        Returns boolean

        • true if the input matches the type associated with the discriminator, false otherwise.

    0.1.0