setWorkspaceSetting() function updates a single workspace setting value programmatically.
Parameters
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.
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