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

Function renderDateError

packages/effect/src/cli/Prompt.ts:1740–1750  ·  view source on GitHub ↗
(state: DateState, pointer: string, theme: Theme)

Source from the content-addressed store, hash-verified

1738}
1739
1740const renderDateError = (state: DateState, pointer: string, theme: Theme): string => {
1741 if (Option.isSome(state.error)) {
1742 const errorLines = state.error.value.split(NEWLINE_REGEXP)
1743 if (Arr.isReadonlyArrayNonEmpty(errorLines)) {
1744 const prefix = annotateSymbol(theme, pointer, theme.errorColor)
1745 const lines = Arr.map(errorLines, (str) => annotateErrorLine(theme, str))
1746 return Ansi.cursorSavePosition + "\n" + separateSymbol(prefix, lines.join("\n")) + Ansi.cursorRestorePosition
1747 }
1748 }
1749 return ""
1750}
1751
1752const renderParts = (state: DateState, theme: Theme, submitted: boolean = false) => {
1753 return Arr.reduce(

Callers 1

Prompt.tsFile · 0.85

Calls 6

annotateSymbolFunction · 0.85
annotateErrorLineFunction · 0.85
separateSymbolFunction · 0.85
splitMethod · 0.45
mapMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected