Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not import typescript outside of config/project loading #1433

Merged
merged 1 commit into from Aug 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/index.ts
Expand Up @@ -23,7 +23,6 @@ import {
ModuleTypeClassifier,
} from './module-type-classifier';
import { createResolverFunctions } from './resolver-functions';
import { ScriptTarget } from 'typescript';

export { TSCommon };
export {
Expand Down Expand Up @@ -551,7 +550,7 @@ export function create(rawOptions: CreateOptions = {}): Service {
];

// Experimental REPL await is not compatible targets lower than ES2018
const targetSupportsTla = config.options.target! >= ScriptTarget.ES2018;
const targetSupportsTla = config.options.target! >= ts.ScriptTarget.ES2018;
if (options.experimentalReplAwait === true && !targetSupportsTla) {
throw new Error(
'Experimental REPL await is not compatible with targets lower than ES2018'
Expand Down