From 2aa5fb7383923dfb21c2f358bed9515134f66632 Mon Sep 17 00:00:00 2001 From: sibbng Date: Tue, 22 Feb 2022 17:45:18 +0300 Subject: [PATCH 1/4] feat(runtime-core): export `currentInstance` methods --- packages/runtime-core/src/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index ad4817d91b9..05e3a7c0c59 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -79,7 +79,12 @@ export { // For getting a hold of the internal instance in setup() - useful for advanced // plugins -export { getCurrentInstance } from './component' +export { + currentInstance, + getCurrentInstance, + setCurrentInstance, + unsetCurrentInstance +} from './component' // For raw render function users export { h } from './h' From 414cf91ddd0c67a0bb3d1b9d730e2327d34371b2 Mon Sep 17 00:00:00 2001 From: sibbng Date: Fri, 4 Mar 2022 15:32:50 +0300 Subject: [PATCH 2/4] feat: export `createHook` --- packages/runtime-core/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 05e3a7c0c59..ae6e5b5d4e7 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -42,6 +42,7 @@ export { watchSyncEffect } from './apiWatch' export { + createHook, onBeforeMount, onMounted, onBeforeUpdate, From 0663df1cd74941e2d3041447fa75aa4d79a66bbb Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:57:13 +0000 Subject: [PATCH 3/4] [autofix.ci] apply automated fixes --- packages/runtime-core/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 53c78948efe..7a31e72dae2 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -108,7 +108,7 @@ export { currentInstance, getCurrentInstance, setCurrentInstance, - unsetCurrentInstance + unsetCurrentInstance, } from './component' // For raw render function users From 62a9af5d034f94acfc0480c5d61a4e8fa1547c67 Mon Sep 17 00:00:00 2001 From: daiwei Date: Wed, 23 Oct 2024 16:06:03 +0800 Subject: [PATCH 4/4] chore: export createHook --- packages/runtime-core/src/apiLifecycle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/apiLifecycle.ts b/packages/runtime-core/src/apiLifecycle.ts index b79a6d38a06..d30726e0e16 100644 --- a/packages/runtime-core/src/apiLifecycle.ts +++ b/packages/runtime-core/src/apiLifecycle.ts @@ -63,7 +63,7 @@ export function injectHook( } } -const createHook = +export const createHook = any>(lifecycle: LifecycleHooks) => ( hook: T,