This PR resolves #4, it enables developers to customize the nullable postfix. Currently, the default is "null", but examples of postfixes that others might want to use are "undefined", "null | undefined", or even no postfix at all ("").
This PR also fixes arrays that have a nullable element type. It turns int | null[] into (int | null)[], and it also works with custom nullable postfixes of course. I could've used Array<...> instead, but I decided that because (...)[] is shorter, it's probably the preferred way to go.
This PR resolves #4, it enables developers to customize the nullable postfix. Currently, the default is
"null"
, but examples of postfixes that others might want to use are"undefined"
,"null | undefined"
, or even no postfix at all (""
).This PR also fixes arrays that have a nullable element type. It turns
int | null[]
into(int | null)[]
, and it also works with custom nullable postfixes of course. I could've usedArray<...>
instead, but I decided that because(...)[]
is shorter, it's probably the preferred way to go.