Skip to content

Commit

Permalink
update to typescript 3.3.3333
Browse files Browse the repository at this point in the history
  • Loading branch information
gasolin committed Feb 23, 2019
1 parent fffbd92 commit a08d08e
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/cn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lingascript-cn",
"author": "Fred Lin",
"homepage": "https://github.com/gasolin/lingascript",
"version": "0.2.0",
"version": "0.3.0",
"license": "Apache-2.0",
"description": "LingaScript is TypeScript that support Simplified Chinese keywords",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/common/compiler/binder.ts.diff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@@ -99118,16 +99118,134 @@
@@ -99386,16 +99386,134 @@
guments%22
+ %7C%7C%0D%0A node.escapedText === unicodeDic.Function.eval %7C%7C node.escapedText === unicodeDic.Function.arguments
);%0D%0A
@@ -110481,16 +110481,141 @@
@@ -110749,16 +110749,141 @@
strict'%22
+ %7C%7C%0D%0A nodeText === %60%22$%7BunicodeDic.JavaScript.use_strict%7D%22%60 %7C%7C nodeText === %60'$%7BunicodeDic.JavaScript.use_strict%7D'%60
;%0D%0A
4 changes: 2 additions & 2 deletions src/common/compiler/checker.ts.diff
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@
lue%22 as __String
+) %7C%7C getTypeOfPropertyOfType(nextResult, unicodeDic.Iterator.value as __String)
);%0D%0A
@@ -1826736,16 +1826736,62 @@
@@ -1827560,16 +1827560,62 @@
%22target%22
-
+ && escapedText !== unicodeDic.MetaData.target
) %7B%0D%0A
@@ -1827136,16 +1827136,60 @@
@@ -1827960,16 +1827960,60 @@
= %22meta%22
-
+ && escapedText !== unicodeDic.MetaData.meta
Expand Down
8 changes: 6 additions & 2 deletions src/patched/compiler/binder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,15 @@ namespace ts {
// We add the nodes within the `try` block to the `finally`'s antecedents if there's no catch block
// (If there is a `catch` block, it will have all these antecedents instead, and the `finally` will
// have the end of the `try` block and the end of the `catch` block)
let preFinallyPrior = preTryFlow;
if (!node.catchClause) {
if (tryPriors.length) {
const preFinallyFlow = createBranchLabel();
addAntecedent(preFinallyFlow, preTryFlow);
for (const p of tryPriors) {
addAntecedent(preFinallyLabel, p);
addAntecedent(preFinallyFlow, p);
}
preFinallyPrior = finishFlowLabel(preFinallyFlow);
}
}

Expand Down Expand Up @@ -1156,7 +1160,7 @@ namespace ts {
//
// extra edges that we inject allows to control this behavior
// if when walking the flow we step on post-finally edge - we can mark matching pre-finally edge as locked so it will be skipped.
const preFinallyFlow: PreFinallyFlow = { flags: FlowFlags.PreFinally, antecedent: preTryFlow, lock: {} };
const preFinallyFlow: PreFinallyFlow = { flags: FlowFlags.PreFinally, antecedent: preFinallyPrior, lock: {} };
addAntecedent(preFinallyLabel, preFinallyFlow);

currentFlow = finishFlowLabel(preFinallyLabel);
Expand Down
17 changes: 16 additions & 1 deletion src/patched/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29496,9 +29496,12 @@ namespace ts {
return;
}
const file = host.getSourceFile(resolvedDirective.resolvedFileName)!;
fileToDirective.set(file.path, key);
// Add the transitive closure of path references loaded by this file (as long as they are not)
// part of an existing type reference.
addReferencedFilesToTypeDirective(file, key);
});
}

return {
getReferencedExportContainer,
getReferencedImportDeclaration,
Expand Down Expand Up @@ -29657,6 +29660,18 @@ namespace ts {
}
return false;
}

function addReferencedFilesToTypeDirective(file: SourceFile, key: string) {
if (fileToDirective.has(file.path)) return;
fileToDirective.set(file.path, key);
for (const { fileName } of file.referencedFiles) {
const resolvedFile = resolveTripleslashReference(fileName, file.originalFileName);
const referencedFile = host.getSourceFile(resolvedFile);
if (referencedFile) {
addReferencedFilesToTypeDirective(referencedFile, key);
}
}
}
}

function getExternalModuleFileFromDeclaration(declaration: AnyImportOrReExport | ModuleDeclaration | ImportTypeNode): SourceFile | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/patched/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5862,7 +5862,7 @@ namespace ts {

export interface UserPreferences {
readonly disableSuggestions?: boolean;
readonly quotePreference?: "double" | "single";
readonly quotePreference?: "auto" | "double" | "single";
readonly includeCompletionsForModuleExports?: boolean;
readonly includeCompletionsWithInsertText?: boolean;
readonly importModuleSpecifierPreference?: "relative" | "non-relative";
Expand Down
2 changes: 1 addition & 1 deletion src/tw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lingascript-tw",
"author": "Fred Lin",
"homepage": "https://github.com/gasolin/lingascript",
"version": "0.2.0",
"version": "0.3.0",
"license": "Apache-2.0",
"description": "LingaScript is TypeScript that support Traditional Chinese keywords",
"keywords": [
Expand Down

0 comments on commit a08d08e

Please sign in to comment.