Optional
allowIf true, allow secrets to be serialized into the function. This should only be set to true if the calling
code will handle this and propoerly wrap the resulting text in a Secret before passing it into any Resources
or serializing it to any other output format. If set, the containsSecrets
property on the returned
SerializedFunction object will indicate whether secrets were serialized into the function text.
Optional
exportThe name to export from the module defined by the generated module text. Defaults to 'handler'.
Optional
isIf this is a function which, when invoked, will produce the actual entrypoint function. Useful for when serializing a function that has high startup cost that only wants to be run once. The signature of this function should be: () => (provider_handler_args...) => provider_result
This will then be emitted as: exports.[exportName] = serialized_func_name();
In other words, the function will be invoked (once) and the resulting inner function will be what is exported.
Optional
logThe resource to log any errors we encounter against.
Optional
serializeA function to prevent serialization of certain objects captured during the serialization. Primarily used to prevent potential cycles.
Generated using TypeDoc
SerializeFunctionArgs are arguments used to serialize a JavaScript function