diff --git a/TypeScript b/TypeScript index e62f118..598ca48 160000 --- a/TypeScript +++ b/TypeScript @@ -1 +1 @@ -Subproject commit e62f1181b6a94161f8bfa88a84c2cf4c0f66bc3a +Subproject commit 598ca48c94535156c842ddc13fddd24aac1130fe diff --git a/bin/ntypescript.d.ts b/bin/ntypescript.d.ts index 2968657..624b0cc 100644 --- a/bin/ntypescript.d.ts +++ b/bin/ntypescript.d.ts @@ -8526,8 +8526,11 @@ declare namespace ts { containerKind: string; containerName: string; } + interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { + displayParts: SymbolDisplayPart[]; + } interface ReferencedSymbol { - definition: DefinitionInfo; + definition: ReferencedSymbolDefinitionInfo; references: ReferenceEntry[]; } enum SymbolDisplayPartKind { diff --git a/bin/ntypescript.js b/bin/ntypescript.js index d8a50ff..bec463c 100644 --- a/bin/ntypescript.js +++ b/bin/ntypescript.js @@ -58460,7 +58460,8 @@ var ts; name: name, kind: info.symbolKind, fileName: declarations[0].getSourceFile().fileName, - textSpan: ts.createTextSpan(declarations[0].getStart(), 0) + textSpan: ts.createTextSpan(declarations[0].getStart(), 0), + displayParts: info.displayParts }; } function getAliasSymbolForPropertyNameSymbol(symbol, location) { @@ -58629,7 +58630,8 @@ var ts; fileName: targetLabel.getSourceFile().fileName, kind: ScriptElementKind.label, name: labelName, - textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()) + textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()), + displayParts: [ts.displayPart(labelName, SymbolDisplayPartKind.text)] }; return [{ definition: definition, references: references }]; } @@ -58819,6 +58821,8 @@ var ts; possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references); } + var thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword); + var displayParts = thisOrSuperSymbol && getSymbolDisplayPartsDocumentationAndSymbolKind(thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts; return [{ definition: { containerKind: "", @@ -58826,7 +58830,8 @@ var ts; fileName: node.getSourceFile().fileName, kind: ScriptElementKind.variableElement, name: "this", - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()) + textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), + displayParts: displayParts }, references: references }]; @@ -58888,7 +58893,8 @@ var ts; fileName: node.getSourceFile().fileName, kind: ScriptElementKind.variableElement, name: type.text, - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()) + textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), + displayParts: [ts.displayPart(ts.getTextOfNode(node), SymbolDisplayPartKind.stringLiteral)] }, references: references }]; diff --git a/bin/typescript.d.ts b/bin/typescript.d.ts index 70ea655..faaf808 100644 --- a/bin/typescript.d.ts +++ b/bin/typescript.d.ts @@ -8526,8 +8526,11 @@ declare namespace ts { containerKind: string; containerName: string; } + interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { + displayParts: SymbolDisplayPart[]; + } interface ReferencedSymbol { - definition: DefinitionInfo; + definition: ReferencedSymbolDefinitionInfo; references: ReferenceEntry[]; } enum SymbolDisplayPartKind { diff --git a/bin/typescript.js b/bin/typescript.js index 76be0ba..73a0472 100644 --- a/bin/typescript.js +++ b/bin/typescript.js @@ -58460,7 +58460,8 @@ var ts; name: name, kind: info.symbolKind, fileName: declarations[0].getSourceFile().fileName, - textSpan: ts.createTextSpan(declarations[0].getStart(), 0) + textSpan: ts.createTextSpan(declarations[0].getStart(), 0), + displayParts: info.displayParts }; } function getAliasSymbolForPropertyNameSymbol(symbol, location) { @@ -58629,7 +58630,8 @@ var ts; fileName: targetLabel.getSourceFile().fileName, kind: ScriptElementKind.label, name: labelName, - textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()) + textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()), + displayParts: [ts.displayPart(labelName, SymbolDisplayPartKind.text)] }; return [{ definition: definition, references: references }]; } @@ -58819,6 +58821,8 @@ var ts; possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references); } + var thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword); + var displayParts = thisOrSuperSymbol && getSymbolDisplayPartsDocumentationAndSymbolKind(thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts; return [{ definition: { containerKind: "", @@ -58826,7 +58830,8 @@ var ts; fileName: node.getSourceFile().fileName, kind: ScriptElementKind.variableElement, name: "this", - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()) + textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), + displayParts: displayParts }, references: references }]; @@ -58888,7 +58893,8 @@ var ts; fileName: node.getSourceFile().fileName, kind: ScriptElementKind.variableElement, name: type.text, - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()) + textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), + displayParts: [ts.displayPart(ts.getTextOfNode(node), SymbolDisplayPartKind.stringLiteral)] }, references: references }]; diff --git a/kicktravis b/kicktravis index 3e6350e..84c8020 100644 --- a/kicktravis +++ b/kicktravis @@ -1 +1 @@ -2016-08-27 [ci skip] Version: 1.201608270006.1+e62f1181b6a94161f8bfa88a84c2cf4c0f66bc3a +2016-08-28 [ci skip] Version: 1.201608280005.1+598ca48c94535156c842ddc13fddd24aac1130fe diff --git a/package.json b/package.json index 3ca318d..c171883 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ntypescript", - "version": "1.201608270006.1+e62f1181b6a94161f8bfa88a84c2cf4c0f66bc3a", + "version": "1.201608280005.1+598ca48c94535156c842ddc13fddd24aac1130fe", "description": "A nicer version of microsoft/typescript packaged and released for API developers", "main": "./bin/ntypescript.js", "bin": { diff --git a/src/services/services.ts b/src/services/services.ts index a55f2cf..c19eb48 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1373,8 +1373,12 @@ namespace ts { containerName: string; } + export interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { + displayParts: SymbolDisplayPart[]; + } + export interface ReferencedSymbol { - definition: DefinitionInfo; + definition: ReferencedSymbolDefinitionInfo; references: ReferenceEntry[]; } @@ -6107,7 +6111,7 @@ namespace ts { return result; - function getDefinition(symbol: Symbol): DefinitionInfo { + function getDefinition(symbol: Symbol): ReferencedSymbolDefinitionInfo { const info = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, node.getSourceFile(), getContainerNode(node), node); const name = map(info.displayParts, p => p.text).join(""); const declarations = symbol.declarations; @@ -6121,7 +6125,8 @@ namespace ts { name, kind: info.symbolKind, fileName: declarations[0].getSourceFile().fileName, - textSpan: createTextSpan(declarations[0].getStart(), 0) + textSpan: createTextSpan(declarations[0].getStart(), 0), + displayParts: info.displayParts }; } @@ -6316,13 +6321,14 @@ namespace ts { } }); - const definition: DefinitionInfo = { + const definition: ReferencedSymbolDefinitionInfo = { containerKind: "", containerName: "", fileName: targetLabel.getSourceFile().fileName, kind: ScriptElementKind.label, name: labelName, - textSpan: createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()) + textSpan: createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()), + displayParts: [displayPart(labelName, SymbolDisplayPartKind.text)] }; return [{ definition, references }]; @@ -6562,6 +6568,11 @@ namespace ts { getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references); } + const thisOrSuperSymbol = typeChecker.getSymbolAtLocation(thisOrSuperKeyword); + + const displayParts = thisOrSuperSymbol && getSymbolDisplayPartsDocumentationAndSymbolKind( + thisOrSuperSymbol, thisOrSuperKeyword.getSourceFile(), getContainerNode(thisOrSuperKeyword), thisOrSuperKeyword).displayParts; + return [{ definition: { containerKind: "", @@ -6569,7 +6580,8 @@ namespace ts { fileName: node.getSourceFile().fileName, kind: ScriptElementKind.variableElement, name: "this", - textSpan: createTextSpanFromBounds(node.getStart(), node.getEnd()) + textSpan: createTextSpanFromBounds(node.getStart(), node.getEnd()), + displayParts }, references: references }]; @@ -6640,7 +6652,8 @@ namespace ts { fileName: node.getSourceFile().fileName, kind: ScriptElementKind.variableElement, name: type.text, - textSpan: createTextSpanFromBounds(node.getStart(), node.getEnd()) + textSpan: createTextSpanFromBounds(node.getStart(), node.getEnd()), + displayParts: [displayPart(getTextOfNode(node), SymbolDisplayPartKind.stringLiteral)] }, references: references }];