Skip to content

Expose BaseUserTraits type #1244

@charliemourant

Description

@charliemourant

I want to build some of my own utilities around the identify function in my project. To ensure that other contributors only send identify events with traits used in my organisation's Segment setup, I would like to be able to limit the traits identify() is called with to a type like the MyOrgUserTraits below.

type MyOrgCustomTraits = {
    order_sku: string 
    ...
}

type MyOrgUserTraits = Partial<MyOrgCustomTraits> & BaseUserTraits

Currently I cannot do this because the Segment BaseUserTraits type is not exposed and the exposed UserTraits type includes an index signature type allowing any values.

Please could you expose the BaseUserTraits type :)

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