const getProp:
UseProp
= <A, B>(
value: A | undefined,
parse: (t: A) => B,
def: B,
) => B
<A, B>(
value: A | undefined,
parse: (t?: NonNullable<A>) => B,
) => B
<A, B>(
value: A,
parse: (t: A) => B,
) => B
Parse a prop value with a parser and a default.
packages / traits / src / useProp.ts