mirror of
https://github.com/github/codeql.git
synced 2026-05-10 09:19:27 +02:00
JavaScript: Autoformat.
This commit is contained in:
@@ -34,15 +34,16 @@ predicate hasUnknownPropertyRead(LocalObject obj) {
|
||||
* Holds if `obj` flows to an expression that must have a specific type.
|
||||
*/
|
||||
predicate flowsToTypeRestrictedExpression(LocalObject obj) {
|
||||
exists (Expr restricted, TypeExpr type |
|
||||
exists(Expr restricted, TypeExpr type |
|
||||
obj.flowsToExpr(restricted) and
|
||||
not type.isAny() |
|
||||
exists (TypeAssertion assertion |
|
||||
not type.isAny()
|
||||
|
|
||||
exists(TypeAssertion assertion |
|
||||
type = assertion.getTypeAnnotation() and
|
||||
restricted = assertion.getExpression()
|
||||
)
|
||||
or
|
||||
exists (BindingPattern v |
|
||||
exists(BindingPattern v |
|
||||
type = v.getTypeAnnotation() and
|
||||
restricted = v.getAVariable().getAnAssignedExpr()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user