File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,9 @@ import { WorkspaceConfig } from './config';
55
66function context ( files : { [ path :string ] :string } ) : Context {
77 return {
8-
98 config : { } ,
10-
11- async exists ( path : string ) {
12- return path . toString ( ) in files ;
13- } ,
14- async getFullPath ( path : string ) {
15- return path . toString ( ) ;
16- } ,
17- async list ( path : string ) {
18- return Object . keys ( files ) . filter ( c => c . startsWith ( path . toString ( ) ) ) . map ( c => files [ c ] ) ;
19- } ,
20- async read ( path : string ) {
21- return files [ path . toString ( ) ] ;
22- } ,
9+ exists : async ( path : string ) => path . toString ( ) in files ,
10+ read : async ( path : string ) => files [ path . toString ( ) ] ,
2311 }
2412}
2513
Original file line number Diff line number Diff line change @@ -2,10 +2,8 @@ import { WorkspaceConfig } from './config';
22
33export interface Context {
44 config : WorkspaceConfig ;
5- getFullPath ( path : string ) : Promise < string > ;
65 exists ( path : string ) : Promise < boolean > ;
76 read ( path : string ) : Promise < string | undefined > ;
8- list ( folderPath : string ) : Promise < string [ ] > ;
97}
108
119export class ConfigInferrer {
You can’t perform that action at this time.
0 commit comments