Function: create()
create(
title,action):Command
Defined in: diagram/history.ts:51
Creates a basic reversible command.
Example:
function changeFoo(store: FooStore, foo: Foo): Command {
return Command.create('Set foo', () => {
const previous = store.foo;
store.setFoo(foo);
return changeFoo(store, previous);
});
}
Parameters
| Parameter | Type |
|---|---|
|
|
|