Open
Description
Your problem
TypedSQL allows to define argument types for SQL queries.
Currently accepted types are Int, BigInt, Float, Boolean, String, DateTime, Json, Bytes, and Decimal.
It does allow to define argument type as optional or nullable.
Suggested solution
It should be possible to define argument type as optional or nullable.
Here is my suggested example:
-- @param {String | null} $1:name The name of the user
and/or
-- @param {String?} $1:name The name of the user
Alternative solutions
Right now, I am using a pretty nasty workaround to be able to use optional argument types with TypedSQL queries.
const variable: string | null;
this.db.$queryRawTyped(myTypedSqlQuery(variable as string));
Additional context
No response