JS: Add model for react 'use'

This commit is contained in:
Asger F
2025-06-23 15:27:21 +02:00
parent 768ccc6a54
commit 980d0f46fa
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
extensions:
- addsTo:
pack: codeql/javascript-all
extensible: summaryModel
data:
- ["react", "Member[use]", "Argument[0].Awaited", "ReturnValue", "value"]

View File

@@ -8,5 +8,5 @@ async function fetchData() {
function Component() {
const data = use(fetchData());
sink(data); // $ MISSING: hasValueFlow=fetchedData
sink(data); // $ hasValueFlow=fetchedData
}