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
3131import JS:: DataFlow as DataFlow
3232private import AccessPathSyntax
3333
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+ */
3441bindingset [ rawType]
3542predicate parseTypeString ( string rawType , string package , string qualifiedName ) {
3643 exists ( string regexp |
You can’t perform that action at this time.
0 commit comments