@@ -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:
@@ -560,11 +566,6 @@ module ts {
560566
561567 /// GET REFERENCES
562568
563- /**
564- * Return references to a symbol at the requested position.
565- * References are separated by "\n".
566- * Each reference is a "fileindex min lim" sub-string.
567- */
568569 public getReferencesAtPosition ( fileName : string , position : number ) : string {
569570 return this . forwardJSONCall (
570571 "getReferencesAtPosition('" + fileName + "', " + position + ")" ,
@@ -573,6 +574,14 @@ module ts {
573574 } ) ;
574575 }
575576
577+ public findReferences ( fileName : string , position : number ) : string {
578+ return this . forwardJSONCall (
579+ "findReferences('" + fileName + "', " + position + ")" ,
580+ ( ) => {
581+ return this . languageService . findReferences ( fileName , position ) ;
582+ } ) ;
583+ }
584+
576585 public getOccurrencesAtPosition ( fileName : string , position : number ) : string {
577586 return this . forwardJSONCall (
578587 "getOccurrencesAtPosition('" + fileName + "', " + position + ")" ,
0 commit comments