For a given `moduleServer` call, add the code required for {shiny.destroy} to work. This will involve creating the observer list to the user session, and adds all observers within the list.

addDestroyers(module)

Arguments

module

The function call to `moduleServer`

Value

An updated version of `module`, where the {shiny.destroy} code has been added.