@swizzyweb/swizzy-web-service
    Preparing search index...

    Interface AssertOrThrowProps<ARGS>

    Props for performing assertions that throw. - args for evaluation

    interface AssertOrThrowProps<ARGS> {
        args: ARGS;
        assertion: (args: ARGS) => boolean;
        errorMessage?: string | AssertMessageGenerator<ARGS>;
    }

    Type Parameters

    • ARGS
    Index

    Properties

    args: ARGS

    Args to use in assertion.

    assertion: (args: ARGS) => boolean

    Assertion function that performs assertion.

    Type declaration

      • (args: ARGS): boolean
      • Parameters

        Returns boolean

        if assertion passed

    errorMessage?: string | AssertMessageGenerator<ARGS>

    Error message function or string to be included in thrown exception.

    of assert for generating message

    error message to include in assertion exception