()
| 26 | |
| 27 | /** Retrieves a `isRestoring` from Svelte's context */ |
| 28 | export const getIsRestoringContext = (): Readable<boolean> => { |
| 29 | try { |
| 30 | const isRestoring = getContext<Readable<boolean> | undefined>( |
| 31 | _isRestoringContextKey, |
| 32 | ) |
| 33 | return isRestoring ? isRestoring : readable(false) |
| 34 | } catch (error) { |
| 35 | return readable(false) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | /** Sets a `isRestoring` on Svelte's context */ |
| 40 | export const setIsRestoringContext = (isRestoring: Readable<boolean>): void => { |
no outgoing calls
no test coverage detected
searching dependent graphs…