@@ -127,6 +127,12 @@ module ts {
127127 * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
128128 */
129129 getReferencesAtPosition ( fileName : string , position : number ) : string ;
130+
131+ /**
132+ * Returns a JSON-encoded value of the type:
133+ * { definition: <encoded>; references: <encoded>[] }[]
134+ */
135+ findReferences ( fileName : string , position : number ) : string ;
130136
131137 /**
132138 * Returns a JSON-encoded value of the type:
@@ -555,11 +561,6 @@ module ts {
555561
556562 /// GET REFERENCES
557563
558- /**
559- * Return references to a symbol at the requested position.
560- * References are separated by "\n".
561- * Each reference is a "fileindex min lim" sub-string.
562- */
563564 public getReferencesAtPosition ( fileName : string , position : number ) : string {
564565 return this . forwardJSONCall (
565566 "getReferencesAtPosition('" + fileName + "', " + position + ")" ,
@@ -568,6 +569,14 @@ module ts {
568569 } ) ;
569570 }
570571
572+ public findReferences ( fileName : string , position : number ) : string {
573+ return this . forwardJSONCall (
574+ "findReferences('" + fileName + "', " + position + ")" ,
575+ ( ) => {
576+ return this . languageService . findReferences ( fileName , position ) ;
577+ } ) ;
578+ }
579+
571580 public getOccurrencesAtPosition ( fileName : string , position : number ) : string {
572581 return this . forwardJSONCall (
573582 "getOccurrencesAtPosition('" + fileName + "', " + position + ")" ,
0 commit comments