Skip to content

Usage for (deep) readonly and object freeze #19

@plehnen

Description

@plehnen

When I read the proposal, my first thought was: I want to abuse this to get rid of my typescript deep-readonly problems, where the type is not easy to get rid of those "readonly" flags when I clone it.

If this Composite object would be deeply immutable (readonly or frozen) and would have an "extract" function like Composite.extract(Composite({ ...})) which returns a deep clone which is mutable, that would be sooo nice!
Especially if it would play along with TypeScript, being of type Composite<T> and the .extract would become T.

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