(state: DateState, pointer: string, theme: Theme)
| 1738 | } |
| 1739 | |
| 1740 | const 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 | |
| 1752 | const renderParts = (state: DateState, theme: Theme, submitted: boolean = false) => { |
| 1753 | return Arr.reduce( |
no test coverage detected