Incorrect optional typescript declaration generation?

All clear. Go for it, I would really not mind more JavaScript-like optional bindings.

Like I am looking forward to remove my helper :wink:.

const fromNullable = <T>(value: [] | [T]): T | undefined => {
  return value?.[0];
}
1 Like