@karmaniverous/get-dotenv
    Preparing search index...

    Function setOptionalFlag

    • exactOptionalPropertyTypes-safe setter for optional boolean flags: delete when undefined; assign when defined — without requiring an index signature on T.

      Type Parameters

      • T

        Target object type.

      Parameters

      • obj: T

        The object to write to.

      • key: keyof T & string

        The optional boolean property key of T.

      • value: undefined | boolean

        The value to set or undefined to unset.

      Returns void

      Writes through a local Record<string, unknown> view to avoid requiring an index signature on T.