@@ -5,11 +5,13 @@ import { TimeoutError } from '@deephaven/utils';
55export const FETCH_TIMEOUT = 10_000 ;
66
77/**
8- * Fetch the definition for a variable given a connection. Subscribes to field updates and triggers when the variable is found.
8+ * Fetch the definition for a variable given a connection. Waits for the next field update
9+ * and resolves if the variable is found in the created variables.
910 * @param connection Connection to get the variable from
1011 * @param name Name of the definition to fetch
1112 * @param timeout Timeout for the fetch
12- * @returns Promise that resolves to the variable definition if found, or rejects if there's an error or the timeout has exceeded
13+ * @returns Promise that resolves to the variable definition if found in the next field update,
14+ * or rejects if the variable is not found in that update or if the timeout is exceeded
1315 */
1416export function fetchVariableDefinition (
1517 connection : dh . IdeConnection ,
@@ -25,12 +27,14 @@ export function fetchVariableDefinition(
2527}
2628
2729/**
28- * Fetch the definition for a variable given a connection. Subscribes to field updates and triggers when a variable matching the predicate is found.
30+ * Fetch the definition for a variable given a connection. Waits for the next field update
31+ * and resolves if a variable matching the predicate is found in the created variables.
2932 * @param connection Connection to get the variable from
3033 * @param predicate Predicate function to test each variable definition
3134 * @param timeout Timeout for the fetch
3235 * @param errorMessage Optional error message for timeout and not found errors
33- * @returns Promise that resolves to the variable definition if found, or rejects if there's an error or the timeout has exceeded
36+ * @returns Promise that resolves to the variable definition if found in the next field update,
37+ * or rejects if no matching variable is found in that update or if the timeout is exceeded
3438 */
3539export function fetchVariableDefinitionByPredicate (
3640 connection : dh . IdeConnection ,
0 commit comments