(state: State, options: Options)
| 216 | } |
| 217 | |
| 218 | function processTab(state: State, options: Options) { |
| 219 | if (state.value === options.default) { |
| 220 | return Effect.succeed(Action.Beep()) |
| 221 | } |
| 222 | const value = getValue(state, options) |
| 223 | const cursor = value.length |
| 224 | return Effect.succeed( |
| 225 | Action.NextFrame({ |
| 226 | state: { ...state, value, cursor, error: Option.none() } |
| 227 | }) |
| 228 | ) |
| 229 | } |
| 230 | |
| 231 | function defaultProcessor(input: string, state: State) { |
| 232 | const beforeCursor = state.value.slice(0, state.cursor) |
no test coverage detected
searching dependent graphs…