MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / waitForEditorChange

Function waitForEditorChange

src/test/helpers.ts:1143–1149  ·  view source on GitHub ↗
(action: () => Thenable<void>)

Source from the content-addressed store, hash-verified

1141
1142
1143export async function waitForEditorChange(action: () => Thenable<void>): Promise<void> {
1144 const doc = currentDoc();
1145 const oldVersion = doc.version;
1146 await action();
1147 await waitFor(() => doc.version !== oldVersion, 20, 2000);
1148 await delay(1);
1149}
1150
1151export async function waitForNextAnalysis(action: () => void | Thenable<void>, timeoutSeconds?: number): Promise<void> {
1152 logger.info("Waiting for any in-progress analysis to complete");

Callers 4

executeCodeActionFunction · 0.85
acceptFirstSuggestionFunction · 0.85

Calls 3

waitForFunction · 0.90
currentDocFunction · 0.85
delayFunction · 0.85

Tested by

no test coverage detected