Remove eval

We should throw instead when dynamic import is not implemented
This commit is contained in:
Matt Bierner committed 2022-05-10 12:00:28 -07:00
1 parent 85e0fcad54
commit f40a867dee
1 file changed
+1 -2
+1 -2
View File
@@ -137,8 +137,7 @@ namespace ts.server {
return ts.server.dynamicImport(id);
}
// Fall back to `eval` if dynamic import wasn't avaialble.
return eval(`import(${JSON.stringify(id)})`); // eslint-disable-line no-eval
throw new Error("Dynamic import not implemented");
};
return {