@adobe/data - v0.10.30
    Preparing search index...

    Variable remapComponentConst

    remapComponent: <From = any, To = unknown>(
        store: RemappableStore,
        component: string,
        targetSchema: Schema.Schema,
        remap: (oldValue: From, index: number) => To,
    ) => void = remapStoreComponent

    Change a component's schema across the whole store IN PLACE by mapping every value through remap, then adopt the target schema. The tool a MAJOR version handler reaches for when a change is too structural for automatic conversion.

    Type declaration

      • <From = any, To = unknown>(
            store: RemappableStore,
            component: string,
            targetSchema: Schema.Schema,
            remap: (oldValue: From, index: number) => To,
        ): void
      • Change a component's schema across the whole store IN PLACE by mapping every value through remap, then adopt targetSchema as the component's schema.

        This is the tool a MAJOR version handler reaches for: a change too structural for automatic conversion (a number → object, an enum-value rename, splitting or moving a field). For an auto-convertible change use Store.coerceComponent instead — it needs no value function.

        Type Parameters

        • From = any
        • To = unknown

        Parameters

        • store: RemappableStore
        • component: string
        • targetSchema: Schema.Schema
        • remap: (oldValue: From, index: number) => To

        Returns void