-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: QL-side type/name resolution for TypeScript and JSDoc #19078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
5064cd5
JS: Exclude externs from CallGraph meta-query
asgerf 9fc0b8c
JS: Add ImportSpecifier.getImportDeclaration()
asgerf 50e4ac8
JS: Do not ignore variables from ambient declarations
asgerf b5a4fc0
JS: Make Closure concepts based on AST instead
asgerf 4cd6f45
JS: Avoid accidental recursion with API graphs
asgerf 9566265
JS: Add helper for getting local type names
asgerf 4bfb048
JS: Resolve JSDocLocalTypeAccess to a variable in scope
asgerf 1051136
JS: Add test
asgerf 1533e13
JS: Add NameResolution.qll
asgerf d61f576
JS: Add UnderlyingTypes.qll
asgerf fc580a5
JS: Add TypeResolution.qll
asgerf b923eac
JS: Use underlying types in DataFlow::Node
asgerf cca48c0
JS: Use in TypeAnnotation.getClass and hasUnderlyingType predicates
asgerf 9fd85c9
JS: Update jQuery model
asgerf 2d21074
JS: Use sanitizing primitive types in ViewComponentInput
asgerf 6fdd7fe
JS: Use sanitizing primitive type in Nest model
asgerf 4e44fda
JS: Use hasUnderlyingStringOrAnyType in Nest model
asgerf 6ac35f1
JS: Use in MissingAwait
asgerf 989402d
JS: Remove some dependencies on type extraction
asgerf 57811ed
JS: Some test updates
asgerf 307715a
JS: Use type resolution for CG augmentation
asgerf f06b9a9
JS: Add call graph test with types
asgerf 500291d
JS: Hide shadowed inherited members
asgerf 167f752
JS: Also propagate through promise types
asgerf 6e82b6e
JS: Add failing test for assigning a non-SourceNode to a type annotat…
asgerf e07a036
JS: Mark type-annotated nodes as SourceNode
asgerf fbafd6f
JS: Update to avoid deprecations after import resolution change
asgerf b8dc1b3
JS: Remove redundant casts
asgerf bba872a
JS: Make jump-to-def behave nicer
asgerf de7d851
JS: Update output of old HasUnderlyingType test
asgerf 22a4114
JS: Accept regression in overload resolution
asgerf b610e10
JS: Accept change in handling of variable resolution in face of ambie…
asgerf 27979c6
JS: Add regression tests for declared globals
asgerf 9bcc620
JS: Fix regression from global declare vars
asgerf 11607e5
JS: Update TRAP after extractor change
asgerf b698b4e
JS: Add test for missing type flow through generics
asgerf d644f80
JS: Remove obsolete meta query
asgerf 853ba49
Update javascript/ql/lib/semmle/javascript/internal/TypeResolution.qll
asgerf 79101fd
JS: Add test with type casts
asgerf 57fad7e
JS: Add SatisfiesExpr
asgerf 691fdb1
JS: Nicer jump-to-def for function declarations
asgerf 42f762a
JS: Update test output now that 'satisfies' is a SourceNode
asgerf a6488cb
Update javascript/ql/lib/semmle/javascript/internal/NameResolution.qll
asgerf 18f9133
JS: Rename and clarify comment for trackFunctionType
asgerf 72cc439
JS: Normalize a few more extensions
asgerf 2aa5fa1
JS: Add comment and examples in FlowImpl doc
asgerf e848aa7
JS: Clarifying comment on commonStep
asgerf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
javascript/ql/test/library-tests/UnderlyingTypes/varAssignment.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import * as express from 'express'; | ||
|
||
function t1(e) { | ||
var req: express.Request = e; // $ MISSING: hasUnderlyingType='express'.Request | ||
var req: express.Request = e; // $ hasUnderlyingType='express'.Request | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.