File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
javascript/ql/lib/semmle/javascript/frameworks/data/internal Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ import semmle.javascript.frameworks.data.internal.AccessPathSyntax as AccessPath
31
31
import JS:: DataFlow as DataFlow
32
32
private import AccessPathSyntax
33
33
34
+ /**
35
+ * Holds if `rawType` represents the JavaScript npm `package` with type `qualifiedName`.
36
+ * The `qualifiedName` is everything after the first ".".
37
+ * So e.g. `rawType = "foo.bar"` will parse to `package = "foo" and qualifiedName = "bar"`.
38
+ * `package´ can be enclosed in single-quotes if the package name includes dots,
39
+ * e.g. `'my.package'.type` parses to `package = "my.package" and qualifiedName = "type"`.
40
+ */
34
41
bindingset [ rawType]
35
42
predicate parseTypeString ( string rawType , string package , string qualifiedName ) {
36
43
exists ( string regexp |
You can’t perform that action at this time.
0 commit comments