TinyBase logoTinyBase

constructor

The constructor is used to create the Durable Object that will synchronize the TinyBase clients.

new WsServerDurableObject<Env>(
  ctx: DurableObjectState,
  env: Env,
): WsServerDurableObject<Env>
TypeDescription
ctxDurableObjectState

The DurableObjectState context.

envEnv

The DurableObjectState environment.

returnsWsServerDurableObject<Env>

A new instance of the WsServerDurableObject.

For basic TinyBase synchronization and persistence, you don't need to override this method, but if you do, ensure you call the super constructor with the two parameters.

Since

v5.4.0