refactor: use explicit exports for runtime-core

This commit is contained in:
Evan You
2020-02-14 00:13:54 -05:00
parent 42d80b5888
commit 112d8f7d86
11 changed files with 103 additions and 124 deletions

View File

@@ -501,3 +501,11 @@ function createSetupContext(instance: ComponentInternalInstance): SetupContext {
}
return __DEV__ ? Object.freeze(context) : context
}
// record effects created during a component's setup() so that they can be
// stopped when the component unmounts
export function recordInstanceBoundEffect(effect: ReactiveEffect) {
if (currentInstance) {
;(currentInstance.effects || (currentInstance.effects = [])).push(effect)
}
}