mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
Remove eval
We should throw instead when dynamic import is not implemented
This commit is contained in:
parent
85e0fcad54
commit
f40a867dee
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user