I can check if my variable is a string by using the code below
if (typeof myVariable === "string") {
}
but now I need to check if my variable is any
or not. I try using the code below
if (typeof myVariable === "any") {
}
but I have error
This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"any"' have no overlap.ts(2367) Invalid typeof comparison value.
so how to solve this?