app.resolve
app/mainapp.resolve(id: number, success: boolean, payload: string, code: string, message: string)
Receives the bounded completion of an asynchronous Host, Server, or Media request.
When to use it
Implement resolve when the application starts asynchronous Host, Server, or Media operations and must correlate their results by RequestId.
Parameters
| Parameter | Type / values | Description |
|---|---|---|
| id | number | The RequestId returned when the operation started. |
| success | boolean | Whether the operation completed successfully. |
| payload | string | The successful bounded payload, or an empty string after failure. |
| code | string | The stable failure code, or an empty string after success. |
| message | string | The bounded diagnostic message, or an empty string after success. |
Returns
Nothing. Clear the matching pending operation and update state for the following render.
Focused example
local function resolve(
id: number,
success: boolean,
payload: string,
code: string,
message: string
)
-- Match id, clear pending work, then update state.
end