Skip to content

Commit cce7800

Browse files
fix(kit): resolve TS errors (#1051)
1 parent b142099 commit cce7800

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

packages/devtools-kit/src/core/component/state/custom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export function getObjectDetails(object: Record<string, any>) {
241241
const value = toRaw(info.reactive ? object : tryGetRefValue(object))
242242

243243
const raw = ensurePropertyExists(object, 'effect')
244-
? object.effect?.raw?.toString() || object.effect?.fn?.toString()
244+
? (object.effect as any)?.raw?.toString() || (object.effect as any)?.fn?.toString()
245245
: null
246246

247247
return {

packages/devtools-kit/src/core/component/tree/index.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/devtools-kit/src/core/component/tree/walker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export class ComponentWalker {
9999
renderKey: getRenderKey(instance.vnode ? instance.vnode.key : null),
100100
inactive,
101101
children: [],
102+
hasChildren: !!children.length,
102103
isFragment: isFragment(instance),
103104
tags: typeof instance.type !== 'function'
104105
? []

packages/devtools-kit/src/types/component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface ComponentTreeNode {
1818
tags: InspectorNodeTag[]
1919
autoOpen: boolean
2020
meta?: any
21+
file?: string
2122
}
2223

2324
type ComponentBuiltinCustomStateTypes = 'function' | 'map' | 'set' | 'reference' | 'component' | 'component-definition' | 'router' | 'store'

0 commit comments

Comments
 (0)