Files
dusk/types/save/save.d.ts
T
2026-06-07 19:51:54 -05:00

39 lines
960 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
/** Slot-based save file management. */
interface SaveNamespace {
/**
* Returns `true` if a save file is present for the given slot.
* @param slot - Save slot index (02).
*/
exists(slot: number): boolean;
/**
* Loads the save file for the given slot from persistent storage.
* Throws if the load fails.
* @param slot - Save slot index (02).
*/
load(slot: number): void;
/**
* Writes the save file for the given slot to persistent storage.
* Throws if the write fails.
* @param slot - Save slot index (02).
*/
write(slot: number): void;
/**
* Deletes the save file for the given slot from persistent storage.
* Throws if the delete fails.
* @param slot - Save slot index (02).
*/
delete(slot: number): void;
}
declare var Save: SaveNamespace;