FilesRegister.d.ts 816 B

12345678910111213141516171819202122232425
  1. import * as ts from 'typescript';
  2. import { LintReport } from './types/eslint';
  3. export interface DataShape {
  4. source?: ts.SourceFile;
  5. linted: boolean;
  6. eslints: LintReport[];
  7. }
  8. export declare class FilesRegister {
  9. private dataFactory;
  10. private files;
  11. constructor(dataFactory: (_data?: DataShape) => DataShape);
  12. keys(): string[];
  13. add(filePath: string): void;
  14. remove(filePath: string): void;
  15. has(filePath: string): boolean;
  16. get(filePath: string): {
  17. mtime?: number | undefined;
  18. data: DataShape;
  19. };
  20. ensure(filePath: string): void;
  21. getData(filePath: string): DataShape;
  22. mutateData(filePath: string, mutator: (data: DataShape) => void): void;
  23. getMtime(filePath: string): number | undefined;
  24. setMtime(filePath: string, mtime: number): void;
  25. }