Skip to content

Documentation / @warp-drive/schema-record / withDefaults

Function: withDefaults()

ts
function withDefaults(schema): PolarisResourceSchema;

Defined in: warp-drive-packages/core/declarations/reactive/-private/schema.d.ts:156

Utility for constructing a ResourceSchema with the recommended fields for the PolarisMode experience.

Using this requires registering the PolarisMode derivations

ts
import { registerDerivations } from '@warp-drive/schema-record';

registerDerivations(schema);

Parameters

schema

WithPartial<PolarisResourceSchema, "identity">

Returns

PolarisResourceSchema

Released under the MIT License.