declare interface Location { line: number; column: number; } declare interface ResolvedLocation extends Location { sourceFile: FileType; sourceLine: string; error?: Error; } declare interface File { path: string; text: string; lines: string[]; error?: Error; } declare interface FileAsync extends File { resolve (location: Location): Promise> } declare interface FileSync extends File { resolve (location: Location): ResolvedLocation } declare interface FileCache { resetCache (): void; getCache (): { [key: string]: T }; } declare interface getSourceAsync extends FileCache { (path: string): Promise; } declare interface getSourceSync extends FileCache { (path: string): FileSync; async: getSourceAsync; } declare const getSource: getSourceSync; export = getSource;