Skip to content

Documentation / @warp-drive/core / reactive / withDefaults

Function: withDefaults()

ts
function withDefaults(schema): ResourceSchema;

Defined in: warp-drive-packages/core/src/reactive/-private/schema.ts:84

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

ResourceSchema

Released under the MIT License.