Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into javaScriptPrototypes
# Conflicts:
#	src/compiler/binder.ts
#	src/compiler/checker.ts
#	src/harness/fourslash.ts
  • Loading branch information
RyanCavanaugh committed Dec 1, 2015
commit c3b59d156fe3c2e30a0d1b799d3004daf9017ab8
12 changes: 6 additions & 6 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ namespace ts {

const noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);

let anySignature = createSignature(undefined, undefined, emptyArray, undefined, anyType, undefined, 0, false, false);
let unknownSignature = createSignature(undefined, undefined, emptyArray, undefined, unknownType, undefined, 0, false, false);
const anySignature = createSignature(undefined, undefined, emptyArray, undefined, anyType, undefined, 0, false, false);
const unknownSignature = createSignature(undefined, undefined, emptyArray, undefined, unknownType, undefined, 0, false, false);

const globals: SymbolTable = {};

Expand Down Expand Up @@ -3383,8 +3383,8 @@ namespace ts {
}

function getDefaultConstructSignatures(classType: InterfaceType): Signature[] {
if (!getBaseTypes(classType).length) {
return [createSignature(undefined, classType.localTypeParameters, emptyArray, SignatureKind.Construct, classType, undefined, 0, false, false)];
if (!hasClassBaseType(classType)) {
return [createSignature(undefined, classType.localTypeParameters, emptyArray, SignatureKind.Construct, classType, undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false)];
}
const baseConstructorType = getBaseConstructorTypeOfClass(classType);
const baseSignatures = getSignaturesOfType(baseConstructorType, SignatureKind.Construct);
Expand Down Expand Up @@ -4069,8 +4069,8 @@ namespace ts {
// object type literal or interface (using the new keyword). Each way of declaring a constructor
// will result in a different declaration kind.
if (!signature.isolatedSignatureType) {
let isConstructor = signature.kind === SignatureKind.Construct;
let type = <ResolvedType>createObjectType(TypeFlags.Anonymous | TypeFlags.FromSignature);
const isConstructor = signature.kind === SignatureKind.Construct;
const type = <ResolvedType>createObjectType(TypeFlags.Anonymous | TypeFlags.FromSignature);
type.members = emptySymbols;
type.properties = emptyArray;
type.callSignatures = !isConstructor ? [signature] : emptyArray;
Expand Down
14 changes: 7 additions & 7 deletions src/harness/fourslash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ namespace FourSlash {
}

public printCurrentQuickInfo() {
let quickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition);
const quickInfo = this.languageService.getQuickInfoAtPosition(this.activeFile.fileName, this.currentCaretPosition);
Harness.IO.log("Quick Info: " + quickInfo.displayParts.map(part => part.text).join(""));
}

Expand Down Expand Up @@ -1203,12 +1203,12 @@ namespace FourSlash {
}

public printMemberListMembers() {
let members = this.getMemberListAtCaret();
const members = this.getMemberListAtCaret();
this.printMembersOrCompletions(members);
}

public printCompletionListMembers() {
let completions = this.getCompletionListAtCaret();
const completions = this.getCompletionListAtCaret();
this.printMembersOrCompletions(completions);
}

Expand All @@ -1219,10 +1219,10 @@ namespace FourSlash {
function max<T>(arr: T[], selector: (x: T) => number): number {
return arr.reduce((prev, x) => Math.max(prev, selector(x)), 0);
}
let longestNameLength = max(info.entries, m => m.name.length);
let longestKindLength = max(info.entries, m => m.kind.length);
const longestNameLength = max(info.entries, m => m.name.length);
const longestKindLength = max(info.entries, m => m.kind.length);
info.entries.sort((m, n) => m.sortText > n.sortText ? 1 : m.sortText < n.sortText ? -1 : m.name > n.name ? 1 : m.name < n.name ? -1 : 0);
let membersString = info.entries.map(m => `${pad(m.name, longestNameLength)} ${pad(m.kind, longestKindLength)} ${m.kindModifiers}`).join("\n");
const membersString = info.entries.map(m => `${pad(m.name, longestNameLength)} ${pad(m.kind, longestKindLength)} ${m.kindModifiers}`).join("\n");
Harness.IO.log(membersString);
}

Expand Down Expand Up @@ -3301,4 +3301,4 @@ namespace FourSlashInterface {
};
}
}
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.