PromptCheck<T> typedef

PromptCheck<T> = ({String? problem, T? value}) Function(String typed)

What a prompt's check makes of the typed text.

Either a value to give back, or a problem to show before asking again.

Implementation

typedef PromptCheck<T> = ({T? value, String? problem}) Function(String typed);