Skip to content

Commit 31ea4ba

Browse files
Merge branch 'master' into testPerf
2 parents 98a8b5c + e3812ff commit 31ea4ba

397 files changed

Lines changed: 6555 additions & 4548 deletions

File tree

Some content is hidden

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

bin/lib.core.es6.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,6 +4766,7 @@ interface PromiseLike<T> {
47664766
* @returns A Promise for the completion of which ever callback is executed.
47674767
*/
47684768
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
4769+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
47694770
}
47704771

47714772
/**
@@ -4779,6 +4780,7 @@ interface Promise<T> {
47794780
* @returns A Promise for the completion of which ever callback is executed.
47804781
*/
47814782
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
4783+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
47824784

47834785
/**
47844786
* Attaches a callback for only the rejection of the Promise.

bin/lib.es6.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,6 +4766,7 @@ interface PromiseLike<T> {
47664766
* @returns A Promise for the completion of which ever callback is executed.
47674767
*/
47684768
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
4769+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
47694770
}
47704771

47714772
/**
@@ -4779,6 +4780,7 @@ interface Promise<T> {
47794780
* @returns A Promise for the completion of which ever callback is executed.
47804781
*/
47814782
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
4783+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
47824784

47834785
/**
47844786
* Attaches a callback for only the rejection of the Promise.

bin/tsc.js

Lines changed: 244 additions & 157 deletions
Large diffs are not rendered by default.

bin/tsserver.js

Lines changed: 303 additions & 195 deletions
Large diffs are not rendered by default.

bin/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,7 @@ declare module "typescript" {
13791379
interface LanguageServiceHost {
13801380
getCompilationSettings(): CompilerOptions;
13811381
getNewLine?(): string;
1382+
getProjectVersion?(): string;
13821383
getScriptFileNames(): string[];
13831384
getScriptVersion(fileName: string): string;
13841385
getScriptSnapshot(fileName: string): IScriptSnapshot;

bin/typescript.js

Lines changed: 370 additions & 202 deletions
Large diffs are not rendered by default.

bin/typescriptServices.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,7 @@ declare module ts {
13791379
interface LanguageServiceHost {
13801380
getCompilationSettings(): CompilerOptions;
13811381
getNewLine?(): string;
1382+
getProjectVersion?(): string;
13821383
getScriptFileNames(): string[];
13831384
getScriptVersion(fileName: string): string;
13841385
getScriptSnapshot(fileName: string): IScriptSnapshot;

bin/typescriptServices.js

Lines changed: 370 additions & 202 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript",
33
"author": "Microsoft Corp.",
44
"homepage": "http://typescriptlang.org/",
5-
"version": "1.5.0",
5+
"version": "1.5.2",
66
"licenses": [
77
{
88
"type": "Apache License 2.0",

src/compiler/binder.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,18 @@ module ts {
440440
else if (isBlockOrCatchScoped(<Declaration>node)) {
441441
bindBlockScopedVariableDeclaration(<Declaration>node);
442442
}
443+
else if (isParameterDeclaration(<VariableLikeDeclaration>node)) {
444+
// It is safe to walk up parent chain to find whether the node is a destructing parameter declaration
445+
// because its parent chain has already been set up, since parents are set before descending into children.
446+
//
447+
// If node is a binding element in parameter declaration, we need to use ParameterExcludes.
448+
// Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration
449+
// For example:
450+
// function foo([a,a]) {} // Duplicate Identifier error
451+
// function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter
452+
// // which correctly set excluded symbols
453+
bindDeclaration(<Declaration>node, SymbolFlags.FunctionScopedVariable, SymbolFlags.ParameterExcludes, /*isBlockScopeContainer*/ false);
454+
}
443455
else {
444456
bindDeclaration(<Declaration>node, SymbolFlags.FunctionScopedVariable, SymbolFlags.FunctionScopedVariableExcludes, /*isBlockScopeContainer*/ false);
445457
}

0 commit comments

Comments
 (0)