Skip to main content
The setWorkspaceSetting() function updates a single workspace setting value programmatically.

Parameters

key
string
required
The key of the setting to update. Must match a key defined in your workspace settings schema.The key is fully typed, so TypeScript will only allow valid setting keys.
value
string | boolean | number
required
The new value for the setting. The type must match the setting type defined in your schema.TypeScript will enforce that the value type matches the setting type.

Returns

A promise that resolves when the setting has been updated.

Example

toggle-auto-sync.server.ts

In Client Code

record-action.tsx

Type Safety

The function enforces type safety for both keys and values:
app.settings.ts