MCPcopy
hub / github.com/streamlit/streamlit / AppNode

Interface AppNode

frontend/lib/src/render-tree/AppNode.interface.ts:65–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 * have changed.
64 */
65export interface AppNode {
66 /**
67 * The ID of the script run this node was generated in. When a script finishes
68 * running, the app prunes all stale nodes.
69 */
70 readonly scriptRunId: string
71
72 /**
73 * The ID of the fragment that sent the Delta creating this AppNode. If this
74 * AppNode was not created by a fragment, this field is falsy.
75 */
76 readonly fragmentId?: string
77
78 /**
79 * The hash of the script that created this node.
80 */
81 readonly activeScriptHash?: string
82
83 // A timestamp indicating based on which delta message the node was created.
84 // If the node was created without a delta message, this field is undefined.
85 // This helps us to update React components based on a new backend message even though other
86 // props have not changed; this can happen for UI-only interactions such as dismissing a dialog.
87 readonly deltaMsgReceivedAt?: number
88
89 /**
90 * Accept a visitor.
91 * @param visitor - The visitor to accept.
92 * @returns The result of the visitor's visit{AppNodeType} method.
93 * @example
94 * const visitor = new DebugVisitor()
95 * const result = blockNode.accept(visitor)
96 * console.log(result)
97 */
98 accept<T>(visitor: AppNodeVisitor<T>): T
99
100 /**
101 * Replace a transient node with the given node.
102 */
103 replaceTransientNodeWithSelf(node: TransientNode): AppNode
104
105 /**
106 * Print a tree-like representation of this node and its children for debugging.
107 * Uses the DebugVisitor internally.
108 */
109 debug(): string
110}

Callers 20

BlockNode.test.tsFile · 0.65
clearStaleNodesMethod · 0.65
clearTransientNodesMethod · 0.65
BlockNode.test.tsFile · 0.65
visitTransientNodeMethod · 0.65

Implementers 3

TransientNodefrontend/lib/src/render-tree/Transient
ElementNodefrontend/lib/src/render-tree/ElementNo
BlockNodefrontend/lib/src/render-tree/BlockNode

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…