@nevware21/tripwire - v0.1.8
    Preparing search index...

    Type Alias IGetSetChainableFn<TContext, TValue>

    IGetSetChainableFn: { (): TValue; (value?: TValue): TContext }

    A generic type for getter/setter functions that support both getter and setter functionality with method chaining. This pattern is commonly used for properties like timeout and slow thresholds where you can either retrieve the current value or set a new value and continue chaining.

    Type Parameters

    • TContext

      The context type that the accessor belongs to, used for return type when setting

    • TValue

      The type of the value being accessed (typically number)

    Type Declaration

      • (): TValue
      • Gets the current property value

        Returns TValue

        The current value of the property

      • (value?: TValue): TContext
      • Sets the property value

        Parameters

        • Optionalvalue: TValue

          The new value to set

        Returns TContext

        The context instance for method chaining

    // Getter usage
    const currentTimeout: number = context.timeout();

    // Setter usage with chaining
    context.timeout(5000).slow(1000);

    0.2.0