( callback: PluginAutoUpdateCallback, )
| 49 | * the callback will be invoked immediately with the pending updates. |
| 50 | */ |
| 51 | export function onPluginsAutoUpdated( |
| 52 | callback: PluginAutoUpdateCallback, |
| 53 | ): () => void { |
| 54 | pluginUpdateCallback = callback |
| 55 | |
| 56 | // If there are pending updates that happened before registration, deliver them now |
| 57 | if (pendingNotification !== null && pendingNotification.length > 0) { |
| 58 | callback(pendingNotification) |
| 59 | pendingNotification = null |
| 60 | } |
| 61 | |
| 62 | return () => { |
| 63 | pluginUpdateCallback = null |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Check if pending updates came from autoupdate (for notification purposes). |
no outgoing calls
no test coverage detected