JS: Remove a dependency on getImportedPath()

To avoid negative recursion in some upcoming changes, we want to make sure the modeling of createRequire does not depend on getImportedPath().
This commit is contained in:
Asger F
2025-04-28 13:41:01 +02:00
parent a195d074c9
commit c293f03b9e
2 changed files with 7 additions and 2 deletions

View File

@@ -94,6 +94,11 @@ class ImportDeclaration extends Stmt, Import, @import_declaration {
override PathExpr getImportedPath() { result = this.getChildExpr(-1) }
/**
* INTERNAL USE ONLY. DO NOT USE.
*/
string getRawImportPath() { result = this.getChildExpr(-1).getStringValue() }
/**
* Gets the object literal passed as part of the `with` (or `assert`) clause in this import declaration.
*