Closed

Description
export async function add(params: { [key: string]: string | string[] }): Promise<string> {
if (!params.birthday || typeof params.birthday !== "string" || !Date.parse(params.birthday))
{
...
}
}
Get an Typscript Error on !Date.parse(params.birthday) because params.birthday can be a string or string []
Possible to make also object typeof recognize it as a type guard ?