File .deepsource.toml
not found in the default branch of the repository root. Please refer to the docs.
typeof
expressions should be compared against valid strings JS-0028310 if (data) {
311 const metricList: string[] = [];
312 for (let i = 0; i < data.length; i++) {
313 if (typeof data[i].billable_metric_name !== undefined) {314 metricList.push(data[i].billable_metric_name as unknown as string);
315 }
316
It is usually a typing mistake to compare the result of a typeof
operator to string literals other than the expected results like undefined
, string
, boolean
, object
etc.
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "function"
typeof foo === "string"
typeof bar == "undefined"
typeof foo === baz
typeof bar === typeof qux