| 63 | * have changed. |
| 64 | */ |
| 65 | export 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…