File tree Expand file tree Collapse file tree 4 files changed +0
-37
lines changed Expand file tree Collapse file tree 4 files changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -237,9 +237,6 @@ module FourSlash {
237
237
getLength : ( ) => {
238
238
return sourceText . length ;
239
239
} ,
240
- getLineStartPositions : ( ) => {
241
- return < number [ ] > [ ] ;
242
- } ,
243
240
getChangeRange : ( oldSnapshot : ts . IScriptSnapshot ) => {
244
241
return < ts . TextChangeRange > undefined ;
245
242
}
Original file line number Diff line number Diff line change @@ -72,14 +72,6 @@ module Harness.LanguageService {
72
72
return this . textSnapshot . length ;
73
73
}
74
74
75
- public getLineStartPositions ( ) : string {
76
- if ( this . lineMap === null ) {
77
- this . lineMap = ts . computeLineStarts ( this . textSnapshot ) ;
78
- }
79
-
80
- return JSON . stringify ( this . lineMap ) ;
81
- }
82
-
83
75
public getChangeRange ( oldScript : ts . ScriptSnapshotShim ) : string {
84
76
var oldShim = < ScriptSnapshotShim > oldScript ;
85
77
var range = this . scriptInfo . getTextChangeRangeBetweenVersions ( oldShim . version , this . version ) ;
Original file line number Diff line number Diff line change @@ -74,13 +74,6 @@ module ts {
74
74
/** Gets the length of this script snapshot. */
75
75
getLength ( ) : number ;
76
76
77
- /**
78
- * This call returns the array containing the start position of every line.
79
- * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could
80
- * always determine this (albeit in a more expensive manner).
81
- */
82
- getLineStartPositions ( ) : number [ ] ;
83
-
84
77
/**
85
78
* Gets the TextChangeRange that describe how the text changed between this text and
86
79
* an older version. This information is used by the incremental parser to determine
@@ -106,14 +99,6 @@ module ts {
106
99
return this . text . length ;
107
100
}
108
101
109
- public getLineStartPositions ( ) : number [ ] {
110
- if ( ! this . _lineStartPositions ) {
111
- this . _lineStartPositions = computeLineStarts ( this . text ) ;
112
- }
113
-
114
- return this . _lineStartPositions ;
115
- }
116
-
117
102
public getChangeRange ( oldSnapshot : IScriptSnapshot ) : TextChangeRange {
118
103
// Text-based snapshots do not support incremental parsing. Return undefined
119
104
// to signal that to the caller.
Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ module ts {
25
25
/** Gets the length of this script snapshot. */
26
26
getLength ( ) : number ;
27
27
28
- /** This call returns the JSON-encoded array of the type: number[] */
29
- getLineStartPositions ( ) : string ;
30
-
31
28
/**
32
29
* Returns a JSON-encoded value of the type:
33
30
* { span: { start: number; length: number }; newLength: number }
@@ -192,14 +189,6 @@ module ts {
192
189
return this . scriptSnapshotShim . getLength ( ) ;
193
190
}
194
191
195
- public getLineStartPositions ( ) : number [ ] {
196
- if ( this . lineStartPositions == null ) {
197
- this . lineStartPositions = JSON . parse ( this . scriptSnapshotShim . getLineStartPositions ( ) ) ;
198
- }
199
-
200
- return this . lineStartPositions ;
201
- }
202
-
203
192
public getChangeRange ( oldSnapshot : IScriptSnapshot ) : TextChangeRange {
204
193
var oldSnapshotShim = < ScriptSnapshotShimAdapter > oldSnapshot ;
205
194
var encoded = this . scriptSnapshotShim . getChangeRange ( oldSnapshotShim . scriptSnapshotShim ) ;
You can’t perform that action at this time.
0 commit comments