Skip to content
module@warp-drive/core/reactive

Function withDefaults() ​

ts
function withDefaults(schema): PolarisResourceSchema;

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

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.