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

Method history

src/monogatari.ts:792–805  ·  view source on GitHub ↗
(object?: K | Partial<HistoryMap> | null)

Source from the content-addressed store, hash-verified

790 */
791 static history(object: Partial<HistoryMap>): void;
792 static history<K extends keyof HistoryMap>(object?: K | Partial<HistoryMap> | null): HistoryMap | HistoryMap[K] | void {
793 if (object !== null && object !== undefined) {
794 if (typeof object === 'string') {
795 if (typeof this._history[object] === 'undefined') {
796 (this._history as Record<string, unknown[]>)[object] = [];
797 }
798 return this._history[object];
799 } else {
800 this._history = Object.assign({}, this._history, object) as HistoryMap;
801 }
802 } else {
803 return this._history;
804 }
805 }
806
807 /**
808 * Get the entire state object

Callers 15

setupMethod · 0.80
didApplyMethod · 0.80
didRevertMethod · 0.80
setupMethod · 0.80
onLoadMethod · 0.80
didApplyMethod · 0.80
restoreSceneItemsMethod · 0.80
revertMethod · 0.80
setupMethod · 0.80
didApplyMethod · 0.80
willRevertMethod · 0.80
revertMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected