Skip to content

ShopperExperienceTypes.Page #434

@guidev

Description

@guidev
export type Component = {
    id: string;
    typeId: string;
    data?: object;
    custom?: object;
    regions?: Array<Region>;
} & {
    [key: string]: any;
};

data is now of type object... in v4 it was

data?: {} & {
    [key: string]: any;
};

this allowed to do something like

component.data?.text_title

while now, typescript fails?

What's the reccomended way to access data properties in v5?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions