(state: DateState)
| 1826 | } |
| 1827 | |
| 1828 | const processDateNext = (state: DateState) => { |
| 1829 | const next = state.dateParts[state.cursor].nextPart() |
| 1830 | const cursor = Option.match(next, { |
| 1831 | onNone: () => state.dateParts.findIndex((part) => !part.isToken()), |
| 1832 | onSome: (next) => state.dateParts.indexOf(next) |
| 1833 | }) |
| 1834 | return Action.NextFrame({ |
| 1835 | state: { ...state, typed: "", cursor } |
| 1836 | }) |
| 1837 | } |
| 1838 | |
| 1839 | const defaultDateProcessor = (value: string, state: DateState) => { |
| 1840 | if (/\d/.test(value)) { |
no test coverage detected