mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
JS: Add model for react 'use'
This commit is contained in:
6
javascript/ql/lib/ext/react.model.yml
Normal file
6
javascript/ql/lib/ext/react.model.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/javascript-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["react", "Member[use]", "Argument[0].Awaited", "ReturnValue", "value"]
|
||||
@@ -8,5 +8,5 @@ async function fetchData() {
|
||||
|
||||
function Component() {
|
||||
const data = use(fetchData());
|
||||
sink(data); // $ MISSING: hasValueFlow=fetchedData
|
||||
sink(data); // $ hasValueFlow=fetchedData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user