Light Logo
JavaScript SDK (v0.55.0)Reference

CreateWaitOptions

Options for customizing wait behaviour when creating a prediction.

Interface: CreateWaitOptions

Options for customizing wait behaviour when creating a prediction.

Extends

Properties

duration?

optional duration: number

Max seconds the server holds the connection open while waiting for the prediction to finish. If not set, the server's default is used.


onPoll()?

optional onPoll: (prediction) => Promise<void>

Optional callback that receives the latest prediction after each poll.

Parameters

prediction

PredictionWithDetails

Returns

Promise<void>

Inherited from

WaitOptions.onPoll


poll

poll: boolean

If the prediction isn't finished when the server responds, keep polling until it reaches a terminal state. If false, return it as is, which may not be terminal.


pollInterval

pollInterval: number

Time in milliseconds between polling attempts to check the prediction status.

Inherited from

WaitOptions.pollInterval