How to use the oni-save-parser.progressReporter function in oni-save-parser

To help you get started, we’ve selected a few oni-save-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RoboPhred / oni-duplicity / src / services / save-serializer / save-serializer.worker.ts View on Github external
function writeSave(command: WriteSaveCommand) {
  const injector = progressReporter(onProgress);

  try {
    const data = writeSaveGame(command.saveGame, injector);
    postMessage(writeSaveSuccess(data));
  } catch (e) {
    postMessage(writeSaveError(e));
  }
}
github RoboPhred / oni-duplicity / src / services / save-serializer / save-serializer.worker.ts View on Github external
function parseSave(command: ParseSaveCommand) {
  const injector = progressReporter(onProgress);

  try {
    const save = parseSaveGame(command.data, injector);
    postMessage(parseSaveSuccess(save));
  } catch (e) {
    postMessage(parseSaveError(e));
  }
}