@@ -145,11 +145,7 @@ abstract class PathString extends string {
145
145
n = 0 and result .getContainer ( ) = root and root = getARootFolder ( )
146
146
or
147
147
exists ( Path base | base = resolveUpTo ( n - 1 , root ) |
148
- exists ( string next |
149
- next = getComponent ( n - 1 )
150
- or
151
- next = getOriginalTypeScriptFolder ( getComponent ( n - 1 ) , base .getContainer ( ) )
152
- |
148
+ exists ( string next | next = getComponent ( n - 1 ) |
153
149
// handle empty components and the special "." folder
154
150
( next = "" or next = "." ) and
155
151
result = base
@@ -178,42 +174,6 @@ abstract class PathString extends string {
178
174
Path resolve ( Folder root ) { result = resolveUpTo ( getNumComponent ( ) , root ) }
179
175
}
180
176
181
- /**
182
- * Gets the first folder from `path`.
183
- */
184
- bindingset [ path]
185
- private string getRootFolderFromPath ( string path ) {
186
- not exists ( path .indexOf ( "/" ) ) and result = path
187
- or
188
- result = path .substring ( 0 , path .indexOf ( "/" , 0 , 0 ) )
189
- }
190
-
191
- /**
192
- * Gets a folder of TypeScript files that is compiled into JavaScript files in `outdir` relative to a `parent`.
193
- */
194
- private string getOriginalTypeScriptFolder ( string outdir , Folder parent ) {
195
- exists ( JSONObject tsconfig |
196
- tsconfig .getFile ( ) .getBaseName ( ) = "tsconfig.json" and
197
- tsconfig .isTopLevel ( ) and
198
- tsconfig .getFile ( ) .getParentContainer ( ) = parent
199
- |
200
- outdir =
201
- tsconfig
202
- .getPropValue ( "compilerOptions" )
203
- .( JSONObject )
204
- .getPropValue ( "outDir" )
205
- .( JSONString )
206
- .getValue ( ) and
207
- result =
208
- getRootFolderFromPath ( tsconfig
209
- .getPropValue ( "include" )
210
- .( JSONArray )
211
- .getElementValue ( _)
212
- .( JSONString )
213
- .getValue ( ) )
214
- )
215
- }
216
-
217
177
/**
218
178
* An expression whose value represents a (relative or absolute) file system path.
219
179
*
0 commit comments