Skip to content

Commit 4db697d

Browse files
committed
JS: Remove support for type roots
1 parent 60ad54a commit 4db697d

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

javascript/ql/lib/semmle/javascript/Modules.qll

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,6 @@ abstract class Import extends AstNode {
155155
)
156156
}
157157

158-
/**
159-
* Gets a module in a `node_modules/@types/` folder that matches the imported module name.
160-
*/
161-
private Module resolveFromTypeRoot() {
162-
result.getFile() =
163-
min(TypeRootFolder typeRoot |
164-
|
165-
typeRoot.getModuleFile(this.getImportedPath().getValue())
166-
order by
167-
typeRoot.getSearchPriority(this.getFile().getParentContainer())
168-
)
169-
}
170-
171158
/**
172159
* DEPRECATED. Use `getImportedModule()` instead.
173160
*/
@@ -193,8 +180,7 @@ abstract class Import extends AstNode {
193180
then result = this.resolveExternsImport()
194181
else (
195182
result = this.resolveAsProvidedModule() or
196-
result = this.resolveImportedPath() or
197-
result = this.resolveFromTypeRoot()
183+
result = this.resolveImportedPath()
198184
)
199185
}
200186

0 commit comments

Comments
 (0)