JS: Cache Import.getImportedModule

This commit is contained in:
Asger Feldthaus
2021-01-13 10:55:16 +00:00
parent c5f2c04f16
commit 5f4016be76

View File

@@ -236,6 +236,7 @@ abstract class Import extends ASTNode {
* behavior of Node.js imports, which prefer core modules such as `fs` over any
* source module of the same name.
*/
cached
Module getImportedModule() {
if exists(resolveExternsImport())
then result = resolveExternsImport()