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

Member predicate TypeNameBindingNode::hasQualifiedName

Holds if this refers to a value exported by the given module, with the given qualified name. If the qualifiedName is empty, this refers to the module itself.

For example, the type annotations below have the following name bindings:

import { Request } from "express";

var x: Request; // hasUnderlyingType("express", "Request")
var x: Request | null; // no result (see hasUnderlyingType)
var x: Request & { prop: string }; // no result (see hasUnderlyingType)

interface CustomSubtype extends Request {}

var x: CustomSubtype; // no result (see hasUnderlyingType)

var x: typeof import("express"); // hasUnderlyingType("express", "")
predicate hasQualifiedName(string moduleName, string qualifiedName)