22/// <reference path="tsserverProjectSystem.ts" />
33
44namespace ts {
5- export interface Range {
6- start : number ;
5+ interface Range {
6+ pos : number ;
77 end : number ;
88 name : string ;
99 }
1010
11- export interface Test {
11+ interface Test {
1212 source : string ;
1313 ranges : Map < Range > ;
1414 }
@@ -34,7 +34,7 @@ namespace ts {
3434 const name = s === e
3535 ? source . charCodeAt ( saved + 1 ) === CharacterCodes . hash ? "selection" : "extracted"
3636 : source . substring ( s , e ) ;
37- activeRanges . push ( { name, start : text . length , end : undefined } ) ;
37+ activeRanges . push ( { name, pos : text . length , end : undefined } ) ;
3838 lastPos = pos ;
3939 continue ;
4040 }
@@ -123,12 +123,12 @@ namespace ts {
123123 cancellationToken : { throwIfCancellationRequested : noop , isCancellationRequested : returnFalse } ,
124124 program,
125125 file : sourceFile ,
126- startPosition : selectionRange . start ,
126+ startPosition : selectionRange . pos ,
127127 endPosition : selectionRange . end ,
128128 host : notImplementedHost ,
129129 formatContext : formatting . getFormatContext ( testFormatOptions ) ,
130130 } ;
131- const rangeToExtract = refactor . extractSymbol . getRangeToExtract ( sourceFile , createTextSpanFromBounds ( selectionRange . start , selectionRange . end ) ) ;
131+ const rangeToExtract = refactor . extractSymbol . getRangeToExtract ( sourceFile , createTextSpanFromRange ( selectionRange ) ) ;
132132 assert . equal ( rangeToExtract . errors , undefined , rangeToExtract . errors && "Range error: " + rangeToExtract . errors [ 0 ] . messageText ) ;
133133 const infos = refactor . extractSymbol . getAvailableActions ( context ) ;
134134 const actions = find ( infos , info => info . description === description . message ) . actions ;
@@ -186,12 +186,12 @@ namespace ts {
186186 cancellationToken : { throwIfCancellationRequested : noop , isCancellationRequested : returnFalse } ,
187187 program,
188188 file : sourceFile ,
189- startPosition : selectionRange . start ,
189+ startPosition : selectionRange . pos ,
190190 endPosition : selectionRange . end ,
191191 host : notImplementedHost ,
192192 formatContext : formatting . getFormatContext ( testFormatOptions ) ,
193193 } ;
194- const rangeToExtract = refactor . extractSymbol . getRangeToExtract ( sourceFile , createTextSpanFromBounds ( selectionRange . start , selectionRange . end ) ) ;
194+ const rangeToExtract = refactor . extractSymbol . getRangeToExtract ( sourceFile , createTextSpanFromRange ( selectionRange ) ) ;
195195 assert . isUndefined ( rangeToExtract . errors , rangeToExtract . errors && "Range error: " + rangeToExtract . errors [ 0 ] . messageText ) ;
196196 const infos = refactor . extractSymbol . getAvailableActions ( context ) ;
197197 assert . isUndefined ( find ( infos , info => info . description === description . message ) ) ;
0 commit comments