UNPKG

1.73 kBSource Map (JSON)View Raw
1{"version":3,"file":"ErrorRecovery.js","sourceRoot":"","sources":["../src/ErrorRecovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,oBAAoB,CAAC;AAE5B,eAAe;AACf,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,EAAE,CAAC;AAKnD,cAAc;AACd;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAyB;IACxD,sBAAsB,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,kBAAkB;IACzB,IAAI,iBAAiB,CAAC,cAAc,EAAE;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;KACrD;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { setRecoveryPropsToSave } from './ErroRecoveryStore';\nimport ExpoErrorRecovery from './ExpoErrorRecovery';\nimport './ErrorRecovery.fx';\n\n// @docsMissing\nexport const recoveredProps = _getRecoveredProps();\n\n// @docsMissing\nexport type ErrorRecoveryProps = Record<string, any>;\n\n// @needsAudit\n/**\n * Set arbitrary error recovery props. If your project crashes in production as a result of a fatal\n * JS error, Expo will reload your project. If you've set these props, they'll be passed to your\n * reloaded project's initial props under `exp.errorRecovery`. Access to `localStorage` is required\n * on web, or else this will simply be a no-op.\n *\n * [Read more about error handling with Expo](/guides/errors).\n * @param props An object which will be passed to your reloaded project's initial props if the\n * project was reloaded as a result of a fatal JS error.\n */\nexport function setRecoveryProps(props: ErrorRecoveryProps): void {\n setRecoveryPropsToSave(props);\n}\n\nfunction _getRecoveredProps(): ErrorRecoveryProps | null {\n if (ExpoErrorRecovery.recoveredProps) {\n return JSON.parse(ExpoErrorRecovery.recoveredProps);\n }\n return null;\n}\n"]}
\No newline at end of file