(instance: ComponentInternalInstance)
| 771 | } |
| 772 | |
| 773 | export const setCurrentInstance = (instance: ComponentInternalInstance) => { |
| 774 | const prev = currentInstance |
| 775 | internalSetCurrentInstance(instance) |
| 776 | instance.scope.on() |
| 777 | return (): void => { |
| 778 | instance.scope.off() |
| 779 | internalSetCurrentInstance(prev) |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | export const unsetCurrentInstance = (): void => { |
| 784 | currentInstance && currentInstance.scope.off() |
no test coverage detected