Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
args: CapturedArguments;
instance: unknown;
template?: string | undefined;
meta?: Record<string, any>;

Check failure on line 20 in packages/@glimmer/interfaces/lib/runtime/debug-render-tree.d.ts

View workflow job for this annotation

GitHub Actions / tests / Linting

Unexpected any. Specify a different type
}

export interface CapturedRenderNode {
Expand All @@ -26,6 +27,7 @@
args: Arguments;
instance: unknown;
template: string | null;
meta: Record<string, any> | null;

Check failure on line 30 in packages/@glimmer/interfaces/lib/runtime/debug-render-tree.d.ts

View workflow job for this annotation

GitHub Actions / tests / Linting

Unexpected any. Specify a different type
bounds: null | {
parentElement: SimpleElement;
firstNode: SimpleNode;
Expand Down
3 changes: 3 additions & 0 deletions packages/@glimmer/runtime/lib/compiled/opcodes/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
name: 'in-element',
args,
instance: null,
meta: {
parentElement: vm.elements().element,

Check failure on line 107 in packages/@glimmer/runtime/lib/compiled/opcodes/dom.ts

View workflow job for this annotation

GitHub Actions / tests / Type Checking (current version)

Property 'elements' does not exist on type 'VM'.

Check failure on line 107 in packages/@glimmer/runtime/lib/compiled/opcodes/dom.ts

View workflow job for this annotation

GitHub Actions / tests / Linting

Unsafe member access .element on a type that cannot be resolved

Check failure on line 107 in packages/@glimmer/runtime/lib/compiled/opcodes/dom.ts

View workflow job for this annotation

GitHub Actions / tests / Linting

Unsafe call of a type that could not be resolved

Check failure on line 107 in packages/@glimmer/runtime/lib/compiled/opcodes/dom.ts

View workflow job for this annotation

GitHub Actions / tests / Linting

Unsafe assignment of an error typed value
},
});

registerDestructor(block, () => {
Expand Down
14 changes: 12 additions & 2 deletions packages/@glimmer/runtime/lib/debug-render-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,21 @@ export default class DebugRenderTreeImpl<

private captureNode(id: string, state: TBucket): CapturedRenderNode {
let node = this.nodeFor(state);
let { type, name, args, instance, refs } = node;
let { type, name, args, instance, refs, meta = null } = node;
let template = this.captureTemplate(node);
let bounds = this.captureBounds(node);
let children = this.captureRefs(refs);
return { id, type, name, args: reifyArgsDebug(args), instance, template, bounds, children };
return {
id,
type,
name,
args: reifyArgsDebug(args),
instance,
template,
bounds,
children,
meta,
};
}

private captureTemplate({ template }: InternalRenderNode<TBucket>): Nullable<string> {
Expand Down
Loading