mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
remove redundant inline type casts
This commit is contained in:
@@ -157,7 +157,7 @@ private class AnalyzedImport extends AnalyzedPropertyRead, DataFlow::ValueNode {
|
||||
exports = MkAbstractProperty(TAbstractModuleObject(imported), "exports")
|
||||
|
|
||||
base = exports.getALocalValue() and
|
||||
propName = astNode.(ImportSpecifier).getImportedName()
|
||||
propName = astNode.getImportedName()
|
||||
)
|
||||
or
|
||||
// when importing CommonJS/AMD modules from ES2015, `module.exports` appears
|
||||
@@ -168,7 +168,7 @@ private class AnalyzedImport extends AnalyzedPropertyRead, DataFlow::ValueNode {
|
||||
// CommonJS/AMD module generated by TypeScript compiler
|
||||
imported.getAStmt() instanceof ExportAssignDeclaration
|
||||
) and
|
||||
astNode.(ImportSpecifier).getImportedName() = "default" and
|
||||
astNode.getImportedName() = "default" and
|
||||
base = TAbstractModuleObject(imported) and
|
||||
propName = "exports"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user