Skip to content

Commit 31b99a9

Browse files
committed
feat(devtools): expose setupState target object
1 parent 6eb7fd8 commit 31b99a9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/runtime-core/src/component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ export interface ComponentInternalInstance {
258258
* @internal
259259
*/
260260
setupState: Data
261+
/**
262+
* devtools access to additional info
263+
* @internal
264+
*/
265+
devtoolsRawSetupState?: any
261266
/**
262267
* @internal
263268
*/
@@ -549,6 +554,9 @@ export function handleSetupResult(
549554
}
550555
// setup returned bindings.
551556
// assuming a render function compiled from template is present.
557+
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
558+
instance.devtoolsRawSetupState = setupResult
559+
}
552560
instance.setupState = proxyRefs(setupResult)
553561
if (__DEV__) {
554562
exposeSetupStateOnRenderContext(instance)

0 commit comments

Comments
 (0)