MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / didApply

Method didApply

src/actions/HideImage.ts:87–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 }
86
87 override async didApply(): Promise<ActionApplyResult> {
88 const show = this.engine.state('images').filter((item: string) => {
89 const [show, type, asset,] = item.split(' ');
90 return asset !== this.asset;
91 });
92
93 this.engine.state({ images: show });
94 return { advance: true };
95 }
96
97 override async willRevert(): Promise<void> {
98 if (this.engine.history('image').length === 0) {

Callers 1

revertMethod · 0.45

Calls 1

stateMethod · 0.80

Tested by

no test coverage detected