Skip to content

fix: crashes under es6 build #50141

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27022,7 +27022,9 @@ namespace ts {
case AssignmentDeclarationKind.ExportsProperty:
case AssignmentDeclarationKind.Prototype:
case AssignmentDeclarationKind.PrototypeProperty:
let valueDeclaration = binaryExpression.left.symbol?.valueDeclaration;
// TODO: this crashes in ES6
// eslint-disable-next-line no-var
var valueDeclaration = binaryExpression.left.symbol?.valueDeclaration;
// falls through
case AssignmentDeclarationKind.ModuleExports:
valueDeclaration ||= binaryExpression.symbol?.valueDeclaration;
Expand Down
4 changes: 3 additions & 1 deletion src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,9 @@ namespace ts {
// the program points to old source files that have been invalidated because of
// incremental parsing.

const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings);
// TODO: this crashes in ES6
// eslint-disable-next-line no-var
var documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings);
const options: CreateProgramOptions = {
rootNames: rootFileNames,
options: newSettings,
Expand Down