MCPcopy Create free account
hub / github.com/Effect-TS/effect / clearOutputWithError

Function clearOutputWithError

packages/effect/src/unstable/cli/Prompt.ts:1442–1449  ·  view source on GitHub ↗
(outputText: string, columns: number, errorText?: string)

Source from the content-addressed store, hash-verified

1440}
1441
1442const clearOutputWithError = (outputText: string, columns: number, errorText?: string): string => {
1443 if (errorText !== undefined && errorText.length > 0) {
1444 return Ansi.cursorDown(lines(errorText, columns))
1445 + eraseText(`\n${errorText}`, columns)
1446 + eraseText(outputText, columns)
1447 }
1448 return eraseText(outputText, columns)
1449}
1450
1451interface ConfirmOptionsReq extends Required<ConfirmOptions> {}
1452

Callers 4

handleDateClearFunction · 0.85
handleMultiSelectClearFunction · 0.85
handleNumberClearFunction · 0.85
Prompt.tsFile · 0.85

Calls 2

linesFunction · 0.85
eraseTextFunction · 0.85

Tested by

no test coverage detected