Skip to content

Commit 634d35a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into jsxAndAs
Conflicts: src/compiler/checker.ts src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json src/services/services.ts
2 parents 042f1fc + d9ca99d commit 634d35a

File tree

229 files changed

+4422
-1605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+4422
-1605
lines changed

Jakefile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var serverSources = [
103103
"server.ts"
104104
].map(function (f) {
105105
return path.join(serverDirectory, f);
106-
});
106+
}).concat(servicesSources);
107107

108108
var languageServiceLibrarySources = [
109109
"editorServices.ts",

bin/lib.core.es6.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,7 @@ interface Map<K, V> {
18801880
}
18811881

18821882
interface MapConstructor {
1883+
new (): Map<any, any>;
18831884
new <K, V>(): Map<K, V>;
18841885
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
18851886
prototype: Map<any, any>;
@@ -1896,6 +1897,7 @@ interface WeakMap<K, V> {
18961897
}
18971898

18981899
interface WeakMapConstructor {
1900+
new (): WeakMap<any, any>;
18991901
new <K, V>(): WeakMap<K, V>;
19001902
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
19011903
prototype: WeakMap<any, any>;
@@ -1917,6 +1919,7 @@ interface Set<T> {
19171919
}
19181920

19191921
interface SetConstructor {
1922+
new (): Set<any>;
19201923
new <T>(): Set<T>;
19211924
new <T>(iterable: Iterable<T>): Set<T>;
19221925
prototype: Set<any>;
@@ -1932,6 +1935,7 @@ interface WeakSet<T> {
19321935
}
19331936

19341937
interface WeakSetConstructor {
1938+
new (): WeakSet<any>;
19351939
new <T>(): WeakSet<T>;
19361940
new <T>(iterable: Iterable<T>): WeakSet<T>;
19371941
prototype: WeakSet<any>;

bin/lib.es6.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,7 @@ interface Map<K, V> {
18801880
}
18811881

18821882
interface MapConstructor {
1883+
new (): Map<any, any>;
18831884
new <K, V>(): Map<K, V>;
18841885
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
18851886
prototype: Map<any, any>;
@@ -1896,6 +1897,7 @@ interface WeakMap<K, V> {
18961897
}
18971898

18981899
interface WeakMapConstructor {
1900+
new (): WeakMap<any, any>;
18991901
new <K, V>(): WeakMap<K, V>;
19001902
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
19011903
prototype: WeakMap<any, any>;
@@ -1917,6 +1919,7 @@ interface Set<T> {
19171919
}
19181920

19191921
interface SetConstructor {
1922+
new (): Set<any>;
19201923
new <T>(): Set<T>;
19211924
new <T>(iterable: Iterable<T>): Set<T>;
19221925
prototype: Set<any>;
@@ -1932,6 +1935,7 @@ interface WeakSet<T> {
19321935
}
19331936

19341937
interface WeakSetConstructor {
1938+
new (): WeakSet<any>;
19351939
new <T>(): WeakSet<T>;
19361940
new <T>(iterable: Iterable<T>): WeakSet<T>;
19371941
prototype: WeakSet<any>;

bin/tsc.js

Lines changed: 379 additions & 159 deletions
Large diffs are not rendered by default.

bin/tsserver.js

Lines changed: 426 additions & 159 deletions
Large diffs are not rendered by default.

bin/typescript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ declare module "typescript" {
600600
tag: LeftHandSideExpression;
601601
template: LiteralExpression | TemplateExpression;
602602
}
603-
type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression;
603+
type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
604604
interface TypeAssertion extends UnaryExpression {
605605
type: TypeNode;
606606
expression: UnaryExpression;

bin/typescript.js

Lines changed: 567 additions & 170 deletions
Large diffs are not rendered by default.

bin/typescriptServices.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ declare namespace ts {
600600
tag: LeftHandSideExpression;
601601
template: LiteralExpression | TemplateExpression;
602602
}
603-
type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression;
603+
type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator;
604604
interface TypeAssertion extends UnaryExpression {
605605
type: TypeNode;
606606
expression: UnaryExpression;

bin/typescriptServices.js

Lines changed: 567 additions & 170 deletions
Large diffs are not rendered by default.

src/compiler/binder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ namespace ts {
630630
function getStrictModeIdentifierMessage(node: Node) {
631631
// Provide specialized messages to help the user understand why we think they're in
632632
// strict mode.
633-
if (getAncestor(node, SyntaxKind.ClassDeclaration) || getAncestor(node, SyntaxKind.ClassExpression)) {
633+
if (getContainingClass(node)) {
634634
return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;
635635
}
636636

@@ -688,7 +688,7 @@ namespace ts {
688688
function getStrictModeEvalOrArgumentsMessage(node: Node) {
689689
// Provide specialized messages to help the user understand why we think they're in
690690
// strict mode.
691-
if (getAncestor(node, SyntaxKind.ClassDeclaration) || getAncestor(node, SyntaxKind.ClassExpression)) {
691+
if (getContainingClass(node)) {
692692
return Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;
693693
}
694694

@@ -1031,7 +1031,7 @@ namespace ts {
10311031
// containing class.
10321032
if (node.flags & NodeFlags.AccessibilityModifier &&
10331033
node.parent.kind === SyntaxKind.Constructor &&
1034-
(node.parent.parent.kind === SyntaxKind.ClassDeclaration || node.parent.parent.kind === SyntaxKind.ClassExpression)) {
1034+
isClassLike(node.parent.parent)) {
10351035

10361036
let classDeclaration = <ClassLikeDeclaration>node.parent.parent;
10371037
declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes);

0 commit comments

Comments
 (0)