UNPKG

1.02 kBTypeScriptView Raw
1import { Disposable } from "../index";
2
3/**
4 * Loads and activates a package's main module and resources such as stylesheets,
5 * keymaps, grammar, editor properties, and menus.
6 */
7export interface Package {
8 /** The name of the Package. */
9 readonly name: string;
10
11 /** The path to the Package on disk. */
12 readonly path: string;
13
14 // Event Subscription
15 /** Invoke the given callback when all packages have been activated. */
16 onDidDeactivate(callback: () => void): Disposable;
17
18 // Native Module Compatibility
19 /**
20 * Are all native modules depended on by this package correctly compiled
21 * against the current version of Atom?
22 */
23 isCompatible(): boolean;
24
25 /**
26 * Rebuild native modules in this package's dependencies for the current
27 * version of Atom.
28 */
29 rebuild(): Promise<{ code: number; stdout: string; stderr: string }>;
30
31 /** If a previous rebuild failed, get the contents of stderr. */
32 getBuildFailureOutput(): string | null;
33}