Skip to content

Commit

Permalink
Bump target up to ES2015
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Jul 24, 2022
1 parent 966e732 commit 7753eae
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions scripts/importDefinitelyTypedTests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES5",
"target": "ES2015",
"outDir": "./",
"rootDir": ".",
"newLine": "lf",
Expand All @@ -15,4 +15,4 @@
],
"exclude": [
]
}
}
6 changes: 3 additions & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27009,10 +27009,10 @@ namespace ts {
case AssignmentDeclarationKind.ExportsProperty:
case AssignmentDeclarationKind.Prototype:
case AssignmentDeclarationKind.PrototypeProperty:
let valueDeclaration = binaryExpression.left.symbol?.valueDeclaration;
// falls through
case AssignmentDeclarationKind.ModuleExports:
valueDeclaration ||= binaryExpression.symbol?.valueDeclaration;
const valueDeclaration = kind !== AssignmentDeclarationKind.ModuleExports
? binaryExpression.left.symbol?.valueDeclaration
: binaryExpression.symbol?.valueDeclaration;
const annotated = valueDeclaration && getEffectiveTypeAnnotationNode(valueDeclaration);
return annotated ? getTypeFromTypeNode(annotated) : undefined;
case AssignmentDeclarationKind.ObjectDefinePropertyValue:
Expand Down
4 changes: 2 additions & 2 deletions src/instrumenter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"target": "ES2015",
"lib": [
"es6",
"dom",
Expand All @@ -13,4 +13,4 @@
"files": [
"instrumenter.ts"
]
}
}
3 changes: 2 additions & 1 deletion src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,8 @@ namespace ts {
onUnRecoverableConfigFileDiagnostic: noop,
};

const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings);

// If the program is already up-to-date, we can reuse it
if (isProgramUptoDate(program, rootFileNames, newSettings, (_path, fileName) => host.getScriptVersion(fileName), fileName => compilerHost!.fileExists(fileName), hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
return;
Expand All @@ -1374,7 +1376,6 @@ namespace ts {
// the program points to old source files that have been invalidated because of
// incremental parsing.

const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings);
const options: CreateProgramOptions = {
rootNames: rootFileNames,
options: newSettings,
Expand Down
2 changes: 1 addition & 1 deletion src/tsconfig-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"pretty": true,
"lib": ["es2015.iterable", "es2015.generator", "es5"],
"target": "es5",
"target": "ES2015",
"moduleResolution": "node",
"rootDir": ".",

Expand Down

0 comments on commit 7753eae

Please sign in to comment.