| With a custom ruby function with the following definition, passing `nil` to Timeout errors: code Puppet::Functions.create_function(:wait, Puppet::Functions::InternalFunction) do dispatch :wait do param 'Variant[Future, Array[Future]]', :futures optional_param 'Integer[1]', :timeout optional_param 'Hash[String[1], Any]', :options return_type 'Array[Boltlib::PlanResult]' end def wait(futures, timeout = nil, options = {}) code Inspecting the types that Puppet expects for the function indicates that the timeout is `PIntegerType`, not optional. With the following definition, the function has the correct signature: code Puppet::Functions.create_function(:wait, Puppet::Functions::InternalFunction) do dispatch :wait do param 'Variant[Future, Array[Future]]', :futures optional_param 'Optional[Integer[1]]', :timeout optional_param 'Hash[String[1], Any]', :options return_type 'Array[Boltlib::PlanResult]' end def wait(futures, timeout = nil, options = {}) code |