Skip to content

Commit 70f7479

Browse files
committed
Fix bug of reordering files, add checking for multiple property access expression.
1 parent d4598e9 commit 70f7479

13 files changed

+43
-43
lines changed

lib/tsc.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ var ts;
10181018
var ts;
10191019
(function (ts) {
10201020
ts.version = "2.1.4";
1021-
ts.version_plus = "2.1.12";
1021+
ts.version_plus = "2.1.13";
10221022
})(ts || (ts = {}));
10231023
(function (ts) {
10241024
var Ternary;
@@ -46724,15 +46724,16 @@ var ts;
4672446724
visitCallExpression(expression);
4672546725
break;
4672646726
case 70:
46727+
checkDependencyAtLocation(expression);
46728+
break;
4672746729
case 177:
4672846730
checkDependencyAtLocation(expression);
46731+
case 178:
46732+
visitExpression(expression.expression);
4672946733
break;
4673046734
case 176:
4673146735
visitObjectLiteralExpression(expression);
4673246736
break;
46733-
case 178:
46734-
checkDependencyAtLocation(expression.expression);
46735-
break;
4673646737
case 175:
4673746738
var arrayLiteral = expression;
4673846739
arrayLiteral.elements.forEach(visitExpression);
@@ -46773,7 +46774,7 @@ var ts;
4677346774
}
4677446775
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
4677546776
var declaration = _a[_i];
46776-
if (declaration.kind === 223) {
46777+
if (declaration.kind === 223 || declaration.kind === 147) {
4677746778
var variable = declaration;
4677846779
if (variable.initializer) {
4677946780
continue;
@@ -46814,17 +46815,14 @@ var ts;
4681446815
});
4681546816
}
4681646817
var expression = callExpression.expression;
46818+
visitExpression(expression);
4681746819
switch (expression.kind) {
4681846820
case 184:
4681946821
var functionExpression = expression;
4682046822
visitBlock(functionExpression.body);
4682146823
break;
46822-
case 178:
46823-
checkDependencyAtLocation(expression.expression);
46824-
break;
4682546824
case 177:
4682646825
case 70:
46827-
checkDependencyAtLocation(expression);
4682846826
var callerFileName = getSourceFileOfNode(callExpression).fileName;
4682946827
checkCallTarget(callerFileName, expression);
4683046828
break;
@@ -46868,6 +46866,7 @@ var ts;
4686846866
getForwardDeclarations(declaration.moduleReference, declarations, callerFileName);
4686946867
break;
4687046868
case 223:
46869+
case 147:
4687146870
var variable = declaration;
4687246871
var initializer = variable.initializer;
4687346872
if (initializer) {

lib/tsserver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ var ts;
10231023
var ts;
10241024
(function (ts) {
10251025
ts.version = "2.1.4";
1026-
ts.version_plus = "2.1.12";
1026+
ts.version_plus = "2.1.13";
10271027
})(ts || (ts = {}));
10281028
(function (ts) {
10291029
var Ternary;

lib/tsserverlibrary.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2042,7 +2042,7 @@ declare namespace ts {
20422042
}
20432043
declare namespace ts {
20442044
const version = "2.1.4";
2045-
const version_plus = "2.1.12";
2045+
const version_plus = "2.1.13";
20462046
}
20472047
declare namespace ts {
20482048
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;

lib/tsserverlibrary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ var ts;
10231023
var ts;
10241024
(function (ts) {
10251025
ts.version = "2.1.4";
1026-
ts.version_plus = "2.1.12";
1026+
ts.version_plus = "2.1.13";
10271027
})(ts || (ts = {}));
10281028
(function (ts) {
10291029
var Ternary;

lib/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2150,7 +2150,7 @@ declare namespace ts {
21502150
declare namespace ts {
21512151
/** The version of the TypeScript compiler release */
21522152
const version = "2.1.4";
2153-
const version_plus = "2.1.12";
2153+
const version_plus = "2.1.13";
21542154
}
21552155
declare namespace ts {
21562156
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;

lib/typescript.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ var ts;
11731173
(function (ts) {
11741174
/** The version of the TypeScript compiler release */
11751175
ts.version = "2.1.4";
1176-
ts.version_plus = "2.1.12";
1176+
ts.version_plus = "2.1.13";
11771177
})(ts || (ts = {}));
11781178
/* @internal */
11791179
(function (ts) {
@@ -57824,15 +57824,16 @@ var ts;
5782457824
visitCallExpression(expression);
5782557825
break;
5782657826
case 70 /* Identifier */:
57827+
checkDependencyAtLocation(expression);
57828+
break;
5782757829
case 177 /* PropertyAccessExpression */:
5782857830
checkDependencyAtLocation(expression);
57831+
case 178 /* ElementAccessExpression */:
57832+
visitExpression(expression.expression);
5782957833
break;
5783057834
case 176 /* ObjectLiteralExpression */:
5783157835
visitObjectLiteralExpression(expression);
5783257836
break;
57833-
case 178 /* ElementAccessExpression */:
57834-
checkDependencyAtLocation(expression.expression);
57835-
break;
5783657837
case 175 /* ArrayLiteralExpression */:
5783757838
var arrayLiteral = expression;
5783857839
arrayLiteral.elements.forEach(visitExpression);
@@ -57888,7 +57889,7 @@ var ts;
5788857889
}
5788957890
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
5789057891
var declaration = _a[_i];
57891-
if (declaration.kind === 223 /* VariableDeclaration */) {
57892+
if (declaration.kind === 223 /* VariableDeclaration */ || declaration.kind === 147 /* PropertyDeclaration */) {
5789257893
var variable = declaration;
5789357894
if (variable.initializer) {
5789457895
continue;
@@ -57929,17 +57930,14 @@ var ts;
5792957930
});
5793057931
}
5793157932
var expression = callExpression.expression;
57933+
visitExpression(expression);
5793257934
switch (expression.kind) {
5793357935
case 184 /* FunctionExpression */:
5793457936
var functionExpression = expression;
5793557937
visitBlock(functionExpression.body);
5793657938
break;
57937-
case 178 /* ElementAccessExpression */:
57938-
checkDependencyAtLocation(expression.expression);
57939-
break;
5794057939
case 177 /* PropertyAccessExpression */:
5794157940
case 70 /* Identifier */:
57942-
checkDependencyAtLocation(expression);
5794357941
var callerFileName = getSourceFileOfNode(callExpression).fileName;
5794457942
checkCallTarget(callerFileName, expression);
5794557943
break;
@@ -57983,6 +57981,7 @@ var ts;
5798357981
getForwardDeclarations(declaration.moduleReference, declarations, callerFileName);
5798457982
break;
5798557983
case 223 /* VariableDeclaration */:
57984+
case 147 /* PropertyDeclaration */:
5798657985
var variable = declaration;
5798757986
var initializer = variable.initializer;
5798857987
if (initializer) {

lib/typescriptServices.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2150,7 +2150,7 @@ declare namespace ts {
21502150
declare namespace ts {
21512151
/** The version of the TypeScript compiler release */
21522152
const version = "2.1.4";
2153-
const version_plus = "2.1.12";
2153+
const version_plus = "2.1.13";
21542154
}
21552155
declare namespace ts {
21562156
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;

lib/typescriptServices.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ var ts;
11731173
(function (ts) {
11741174
/** The version of the TypeScript compiler release */
11751175
ts.version = "2.1.4";
1176-
ts.version_plus = "2.1.12";
1176+
ts.version_plus = "2.1.13";
11771177
})(ts || (ts = {}));
11781178
/* @internal */
11791179
(function (ts) {
@@ -57824,15 +57824,16 @@ var ts;
5782457824
visitCallExpression(expression);
5782557825
break;
5782657826
case 70 /* Identifier */:
57827+
checkDependencyAtLocation(expression);
57828+
break;
5782757829
case 177 /* PropertyAccessExpression */:
5782857830
checkDependencyAtLocation(expression);
57831+
case 178 /* ElementAccessExpression */:
57832+
visitExpression(expression.expression);
5782957833
break;
5783057834
case 176 /* ObjectLiteralExpression */:
5783157835
visitObjectLiteralExpression(expression);
5783257836
break;
57833-
case 178 /* ElementAccessExpression */:
57834-
checkDependencyAtLocation(expression.expression);
57835-
break;
5783657837
case 175 /* ArrayLiteralExpression */:
5783757838
var arrayLiteral = expression;
5783857839
arrayLiteral.elements.forEach(visitExpression);
@@ -57888,7 +57889,7 @@ var ts;
5788857889
}
5788957890
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
5789057891
var declaration = _a[_i];
57891-
if (declaration.kind === 223 /* VariableDeclaration */) {
57892+
if (declaration.kind === 223 /* VariableDeclaration */ || declaration.kind === 147 /* PropertyDeclaration */) {
5789257893
var variable = declaration;
5789357894
if (variable.initializer) {
5789457895
continue;
@@ -57929,17 +57930,14 @@ var ts;
5792957930
});
5793057931
}
5793157932
var expression = callExpression.expression;
57933+
visitExpression(expression);
5793257934
switch (expression.kind) {
5793357935
case 184 /* FunctionExpression */:
5793457936
var functionExpression = expression;
5793557937
visitBlock(functionExpression.body);
5793657938
break;
57937-
case 178 /* ElementAccessExpression */:
57938-
checkDependencyAtLocation(expression.expression);
57939-
break;
5794057939
case 177 /* PropertyAccessExpression */:
5794157940
case 70 /* Identifier */:
57942-
checkDependencyAtLocation(expression);
5794357941
var callerFileName = getSourceFileOfNode(callExpression).fileName;
5794457942
checkCallTarget(callerFileName, expression);
5794557943
break;
@@ -57983,6 +57981,7 @@ var ts;
5798357981
getForwardDeclarations(declaration.moduleReference, declarations, callerFileName);
5798457982
break;
5798557983
case 223 /* VariableDeclaration */:
57984+
case 147 /* PropertyDeclaration */:
5798657985
var variable = declaration;
5798757986
var initializer = variable.initializer;
5798857987
if (initializer) {

lib/typingsInstaller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ var ts;
10231023
var ts;
10241024
(function (ts) {
10251025
ts.version = "2.1.4";
1026-
ts.version_plus = "2.1.12";
1026+
ts.version_plus = "2.1.13";
10271027
})(ts || (ts = {}));
10281028
(function (ts) {
10291029
var Ternary;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript-plus",
33
"author": "Dom Chen",
44
"homepage": "http://www.idom.me/",
5-
"version": "2.1.12",
5+
"version": "2.1.13",
66
"license": "Apache-2.0",
77
"description": "An enhanced version of the original typescript compiler.",
88
"keywords": [

src/compiler/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace ts {
55
/** The version of the TypeScript compiler release */
66
export const version = "2.1.4";
7-
export const version_plus = "2.1.12";
7+
export const version_plus = "2.1.13";
88
}
99

1010
/* @internal */

src/compiler/sorting.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,16 @@ namespace ts {
313313
visitCallExpression(<CallExpression>expression);
314314
break;
315315
case SyntaxKind.Identifier:
316+
checkDependencyAtLocation(expression);
317+
break;
316318
case SyntaxKind.PropertyAccessExpression:
317319
checkDependencyAtLocation(expression);
320+
case SyntaxKind.ElementAccessExpression:
321+
visitExpression((<PropertyAccessExpression>expression).expression);
318322
break;
319323
case SyntaxKind.ObjectLiteralExpression:
320324
visitObjectLiteralExpression(<ObjectLiteralExpression>expression);
321325
break;
322-
case SyntaxKind.ElementAccessExpression:
323-
checkDependencyAtLocation((<ElementAccessExpression>expression).expression);
324-
break;
325326
case SyntaxKind.ArrayLiteralExpression:
326327
let arrayLiteral = <ArrayLiteralExpression>expression;
327328
arrayLiteral.elements.forEach(visitExpression);
@@ -379,7 +380,7 @@ namespace ts {
379380
return;
380381
}
381382
for (let declaration of symbol.declarations) {
382-
if (declaration.kind === SyntaxKind.VariableDeclaration) {
383+
if (declaration.kind === SyntaxKind.VariableDeclaration || declaration.kind === SyntaxKind.PropertyDeclaration) {
383384
let variable = <VariableDeclaration>declaration;
384385
if (variable.initializer) {
385386
continue;
@@ -422,17 +423,14 @@ namespace ts {
422423
}
423424

424425
let expression = callExpression.expression;
426+
visitExpression(expression);
425427
switch (expression.kind) {
426428
case SyntaxKind.FunctionExpression:
427429
let functionExpression = <FunctionExpression>expression;
428430
visitBlock(functionExpression.body);
429431
break;
430-
case SyntaxKind.ElementAccessExpression:
431-
checkDependencyAtLocation((<ElementAccessExpression>expression).expression);
432-
break;
433432
case SyntaxKind.PropertyAccessExpression:
434433
case SyntaxKind.Identifier:
435-
checkDependencyAtLocation(expression);
436434
let callerFileName = getSourceFileOfNode(callExpression).fileName;
437435
checkCallTarget(callerFileName, expression);
438436
break;
@@ -477,6 +475,7 @@ namespace ts {
477475
getForwardDeclarations((<ImportEqualsDeclaration>declaration).moduleReference, declarations, callerFileName);
478476
break;
479477
case SyntaxKind.VariableDeclaration:
478+
case SyntaxKind.PropertyDeclaration:
480479
const variable = <VariableDeclaration>declaration;
481480
const initializer = variable.initializer;
482481
if (initializer) {

src/compiler/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,10 @@ namespace ts {
673673
name: PropertyName;
674674
type?: TypeNode;
675675
initializer?: Expression; // Optional initializer
676+
/* @internal */
677+
callerList?: string[];
678+
/* @internal */
679+
delayInitializerList?: Expression[];
676680
}
677681

678682
export interface ObjectLiteralElement extends Declaration {

0 commit comments

Comments
 (0)