Remove eval

We should throw instead when dynamic import is not implemented
This commit is contained in:
Matt Bierner 2022-05-10 12:00:28 -07:00
parent 85e0fcad54
commit f40a867dee
No known key found for this signature in database
GPG Key ID: 099C331567E11888

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 {