Open
Description
In the memento conceptual example, you have the next interface of Memento that will be used by caretakers:
interface Memento {
getState(): string;
getName(): string;
getDate(): string;
}
Following the pattern - caretakers shouldn't have access to the state that memento stores. But with the above interface, we can call memnto.getState() in any caretaker and receive the state because caretakers operate with memntos with this interface.
Metadata
Metadata
Assignees
Labels
No labels