Skip to content

Documentation regarding parsing of ids might be incorrect #1

@jcraane

Description

@jcraane

The documentation regarding parsing ids from prefixed strings (like user_01h455vb4pex5vsknk084sn02q) states it can be parsed with:

val userId: UserId = typeId.parse("user_01h455vb4pex5vsknk084sn02q")

However, if I paste the exact code (where UserId is typealias UserId = Id) it gives s compile time error:

Initializer type mismatch: expected 'UserId', actual 'earth.adi.typeid.RawId'.

I think the example should be (by using the entity User as the type):

val userId3: UserId = typeId.parse("user_01h455vb4pex5vsknk084sn02q")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions