UNPKG

826 BTypeScriptView Raw
1import { Disposable } from '../index';
2
3/**
4 * History manager for remembering which projects have been opened.
5 * An instance of this class is always available as the atom.history global.
6 * The project history is used to enable the 'Reopen Project' menu.
7 */
8export interface HistoryManager {
9 /** Obtain a list of previously opened projects. */
10 getProjects(): ProjectHistory[];
11
12 /**
13 * Clear all projects from the history.
14 * Note: This is not a privacy function - other traces will still exist, e.g.
15 * window state.
16 */
17 clearProjects(): void;
18
19 /** Invoke the given callback when the list of projects changes. */
20 onDidChangeProjects(callback: (args: { reloaded: boolean }) => void): Disposable;
21}
22
23export interface ProjectHistory {
24 paths: string[];
25 lastOpened: Date;
26}