CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.1.1-dev (changelog, source)
Search

Datatype TypeTag

Types inferred by the flow analysis, represented as type tags.

These type tags are similar to the type tags returned by typeof, except that

  • null has type tag null, not object;
  • classes have type tag class, not function;
  • Date objects have type tag date, not object.

We treat Date objects separately since they have some semantic peculiarities; in particular, their primitive coercion yields a number (not a string, as for most other objects).

Import path

import semmle.javascript.dataflow.InferredTypes

Known direct subtypes

Branch types

Injectors