@pulsar-edit/types 1.128.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +33 -0
- package/LICENSE.md +8 -0
- package/README.md +187 -0
- package/atom-i18n/config.d.ts +9 -0
- package/atom-i18n/index.d.ts +4 -0
- package/autocomplete-plus/config.d.ts +140 -0
- package/autocomplete-plus/index.d.ts +200 -0
- package/dependencies/event-kit/index.d.ts +143 -0
- package/dependencies/first-mate/index.d.ts +1 -0
- package/dependencies/first-mate/src/first-mate.d.ts +1 -0
- package/dependencies/first-mate/src/grammar.d.ts +119 -0
- package/dependencies/pathwatcher/index.d.ts +1 -0
- package/dependencies/pathwatcher/src/directory.d.ts +98 -0
- package/dependencies/pathwatcher/src/file.d.ts +115 -0
- package/dependencies/pathwatcher/src/main.d.ts +2 -0
- package/dependencies/service-hub/index.d.ts +3 -0
- package/dependencies/service-hub/src/consumer.d.ts +8 -0
- package/dependencies/service-hub/src/provider.d.ts +14 -0
- package/dependencies/service-hub/src/service-hub.d.ts +46 -0
- package/dependencies/service-hub/src/util.d.ts +1 -0
- package/dependencies/text-buffer/index.d.ts +1 -0
- package/dependencies/text-buffer/src/display-marker-layer.d.ts +182 -0
- package/dependencies/text-buffer/src/display-marker.d.ts +232 -0
- package/dependencies/text-buffer/src/helpers.d.ts +11 -0
- package/dependencies/text-buffer/src/marker-layer.d.ts +117 -0
- package/dependencies/text-buffer/src/marker.d.ts +207 -0
- package/dependencies/text-buffer/src/point.d.ts +102 -0
- package/dependencies/text-buffer/src/range.d.ts +141 -0
- package/dependencies/text-buffer/src/text-buffer.d.ts +759 -0
- package/index.d.ts +72 -0
- package/linter/config.d.ts +26 -0
- package/linter/index.d.ts +108 -0
- package/package.json +61 -0
- package/src/atom-environment.d.ts +361 -0
- package/src/branding.d.ts +19 -0
- package/src/buffered-node-process.d.ts +10 -0
- package/src/buffered-process.d.ts +88 -0
- package/src/clipboard.d.ts +14 -0
- package/src/color.d.ts +11 -0
- package/src/command-registry.d.ts +118 -0
- package/src/config-schema.d.ts +271 -0
- package/src/config.d.ts +168 -0
- package/src/context-menu-manager.d.ts +65 -0
- package/src/cursor.d.ts +252 -0
- package/src/decoration.d.ts +156 -0
- package/src/deserializer-manager.d.ts +15 -0
- package/src/dock.d.ts +121 -0
- package/src/get-window-load-settings.d.ts +26 -0
- package/src/git-repository.d.ts +174 -0
- package/src/grammar-registry.d.ts +241 -0
- package/src/gutter.d.ts +118 -0
- package/src/history-manager.d.ts +28 -0
- package/src/keymap-extensions.d.ts +190 -0
- package/src/language-mode.d.ts +314 -0
- package/src/layer-decoration.d.ts +31 -0
- package/src/menu-manager.d.ts +24 -0
- package/src/notification-manager.d.ts +37 -0
- package/src/notification.d.ts +79 -0
- package/src/other-types.d.ts +283 -0
- package/src/package-manager.d.ts +103 -0
- package/src/package.d.ts +33 -0
- package/src/pane.d.ts +604 -0
- package/src/panel.d.ts +38 -0
- package/src/path-watcher.d.ts +35 -0
- package/src/project.d.ts +110 -0
- package/src/scope-descriptor.d.ts +8 -0
- package/src/selection.d.ts +341 -0
- package/src/style-manager.d.ts +68 -0
- package/src/task.d.ts +38 -0
- package/src/text-editor-component.d.ts +15 -0
- package/src/text-editor-element.d.ts +48 -0
- package/src/text-editor-registry.d.ts +48 -0
- package/src/text-editor.d.ts +1416 -0
- package/src/theme-manager.d.ts +29 -0
- package/src/tooltip-manager.d.ts +42 -0
- package/src/tooltip.d.ts +63 -0
- package/src/ui.d.ts +101 -0
- package/src/view-registry.d.ts +34 -0
- package/src/wasm-tree-sitter-grammar.d.ts +305 -0
- package/src/wasm-tree-sitter-language-mode.d.ts +294 -0
- package/src/workspace-center.d.ts +117 -0
- package/src/workspace.d.ts +485 -0
- package/status-bar/config.d.ts +23 -0
- package/status-bar/index.d.ts +51 -0
- package/tool-bar/config.d.ts +20 -0
- package/tool-bar/index.d.ts +235 -0
- package/tsconfig.json +8 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
// This file holds the types that don't belong to a specific file.
|
|
2
|
+
// Please don't import types from this file directly as its content might change in other versions.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
AtomEnvironment,
|
|
6
|
+
DecorationOptions,
|
|
7
|
+
MarkerLayer,
|
|
8
|
+
Pane,
|
|
9
|
+
Point,
|
|
10
|
+
TextEditor
|
|
11
|
+
} from "../index";
|
|
12
|
+
|
|
13
|
+
export interface PixelPosition {
|
|
14
|
+
left: number;
|
|
15
|
+
top: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* This custom subclass of CustomEvent exists to provide the ::abortKeyBinding
|
|
20
|
+
* method, as well as versions of the ::stopPropagation methods that record the
|
|
21
|
+
* intent to stop propagation so event bubbling can be properly simulated for
|
|
22
|
+
* detached elements.
|
|
23
|
+
*/
|
|
24
|
+
export interface CommandEvent<CurrentTarget extends EventTarget = EventTarget> extends CustomEvent {
|
|
25
|
+
keyBindingAborted: boolean;
|
|
26
|
+
propagationStopped: boolean;
|
|
27
|
+
|
|
28
|
+
abortKeyBinding(): void;
|
|
29
|
+
stopPropagation(): CustomEvent;
|
|
30
|
+
stopImmediatePropagation(): CustomEvent;
|
|
31
|
+
currentTarget: CurrentTarget;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DecorationPropsChangedEvent {
|
|
35
|
+
/** Object the old parameters the decoration used to have. */
|
|
36
|
+
oldProperties: DecorationOptions;
|
|
37
|
+
|
|
38
|
+
/** Object the new parameters the decoration now has */
|
|
39
|
+
newProperties: DecorationOptions;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface EditorChangedEvent {
|
|
43
|
+
/** A Point representing where the change started. */
|
|
44
|
+
start: Point;
|
|
45
|
+
|
|
46
|
+
/** A Point representing the replaced extent. */
|
|
47
|
+
oldExtent: Point;
|
|
48
|
+
|
|
49
|
+
/** A Point representing the replacement extent. */
|
|
50
|
+
newExtent: Point;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FileSavedEvent {
|
|
54
|
+
/** The path to which the buffer was saved. */
|
|
55
|
+
path: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface FilesystemChangeBasic<
|
|
59
|
+
Action extends "created" | "modified" | "deleted" | "renamed" = "created" | "modified" | "deleted",
|
|
60
|
+
> {
|
|
61
|
+
/** A string describing the filesystem action that occurred. */
|
|
62
|
+
action: Action;
|
|
63
|
+
|
|
64
|
+
/** The absolute path to the filesystem entry that was acted upon. */
|
|
65
|
+
path: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface FilesystemChangeRename extends FilesystemChangeBasic<"renamed"> {
|
|
69
|
+
/**
|
|
70
|
+
* For rename events, a string containing the filesystem entry's former
|
|
71
|
+
* absolute path.
|
|
72
|
+
*/
|
|
73
|
+
oldPath: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type FilesystemChange = FilesystemChangeBasic | FilesystemChangeRename;
|
|
77
|
+
|
|
78
|
+
export type FilesystemChangeEvent = FilesystemChange[];
|
|
79
|
+
|
|
80
|
+
export interface HandleableErrorEvent {
|
|
81
|
+
/** The error object. */
|
|
82
|
+
error: Error;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Call this function to indicate you have handled the error.
|
|
86
|
+
* The error will not be thrown if this function is called.
|
|
87
|
+
*/
|
|
88
|
+
handle(): void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface TextEditorObservedEvent {
|
|
92
|
+
textEditor: TextEditor;
|
|
93
|
+
pane: Pane;
|
|
94
|
+
index: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface BuildEnvironmentOptions {
|
|
98
|
+
/**
|
|
99
|
+
* An object responsible for Atom's interaction with the browser process and
|
|
100
|
+
* host OS. Use {@link buildDefaultApplicationDelegate} for a default
|
|
101
|
+
* instance.
|
|
102
|
+
*/
|
|
103
|
+
applicationDelegate?: object | undefined;
|
|
104
|
+
|
|
105
|
+
/** A window global. */
|
|
106
|
+
window?: Window | undefined;
|
|
107
|
+
|
|
108
|
+
/** A document global. */
|
|
109
|
+
document?: Document | undefined;
|
|
110
|
+
|
|
111
|
+
/** A path to the configuration directory (usually `~/.pulsar`). */
|
|
112
|
+
configDirPath?: string | undefined;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* A boolean indicating whether the Atom environment should save or load
|
|
116
|
+
* state from the file system. You probably want this to be false.
|
|
117
|
+
*/
|
|
118
|
+
enablePersistence?: boolean | undefined;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface HistoryTransactionOptions {
|
|
122
|
+
/**
|
|
123
|
+
* When provided, skip taking snapshot for other selections’ markerLayers
|
|
124
|
+
* except given one.
|
|
125
|
+
*/
|
|
126
|
+
selectionsMarkerLayer?: MarkerLayer | undefined;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface HistoryTraversalOptions {
|
|
130
|
+
/**
|
|
131
|
+
* Restore snapshot of selections marker layer to given selectionsMarkerLayer.
|
|
132
|
+
*/
|
|
133
|
+
selectionsMarkerLayer?: MarkerLayer | undefined;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface ReadonlyEditOptions {
|
|
137
|
+
/** Whether the readonly protections on the text editor should be ignored. */
|
|
138
|
+
bypassReadOnly?: boolean | undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface TextEditOptions {
|
|
142
|
+
/**
|
|
143
|
+
* If true, all line endings will be normalized to match the editor's current
|
|
144
|
+
* mode.
|
|
145
|
+
*/
|
|
146
|
+
normalizeLineEndings?: boolean | undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* If `"skip"`, skips the undo stack for this operation.
|
|
150
|
+
* @deprecated Call groupLastChanges() on the TextBuffer afterward instead.
|
|
151
|
+
*/
|
|
152
|
+
undo?: "skip" | undefined;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface TextInsertionOptions extends TextEditOptions {
|
|
156
|
+
/** If true, selects the newly added text. */
|
|
157
|
+
select?: boolean | undefined;
|
|
158
|
+
|
|
159
|
+
/** If true, indents all inserted text appropriately. */
|
|
160
|
+
autoIndent?: boolean | undefined;
|
|
161
|
+
|
|
162
|
+
/** If true, indent newline appropriately. */
|
|
163
|
+
autoIndentNewline?: boolean | undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* If true, decreases indent level appropriately (for example, when a closing
|
|
167
|
+
* bracket is inserted).
|
|
168
|
+
*/
|
|
169
|
+
autoDecreaseIndent?: boolean | undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* By default, when pasting multiple lines, Atom attempts to preserve the
|
|
173
|
+
* relative indent level between the first line and trailing lines, even if
|
|
174
|
+
* the indent level of the first line has changed from the copied text. If
|
|
175
|
+
* this option is `true`, this behavior is suppressed.
|
|
176
|
+
*/
|
|
177
|
+
preserveTrailingLineIndentation?: boolean | undefined;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** An interface which all custom test runners should implement. */
|
|
181
|
+
export type TestRunner = (params: TestRunnerParams) => Promise<number>;
|
|
182
|
+
|
|
183
|
+
export interface CancellablePromise<T> extends Promise<T> {
|
|
184
|
+
cancel(): void;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type FileEncoding =
|
|
188
|
+
| "iso88596" // Arabic (ISO 8859-6)
|
|
189
|
+
| "windows1256" // Arabic (Windows 1256)
|
|
190
|
+
| "iso88594" // Baltic (ISO 8859-4)
|
|
191
|
+
| "windows1257" // Baltic (Windows 1257)
|
|
192
|
+
| "iso885914" // Celtic (ISO 8859-14)
|
|
193
|
+
| "iso88592" // Central European (ISO 8859-2)
|
|
194
|
+
| "windows1250" // Central European (Windows 1250)
|
|
195
|
+
| "gb18030" // Chinese (GB18030)
|
|
196
|
+
| "gbk" // Chinese (GBK)
|
|
197
|
+
| "cp950" // Traditional Chinese (Big5)
|
|
198
|
+
| "big5hkscs" // Traditional Chinese (Big5-HKSCS)
|
|
199
|
+
| "cp866" // Cyrillic (CP 866)
|
|
200
|
+
| "iso88595" // Cyrillic (ISO 8859-5)
|
|
201
|
+
| "koi8r" // Cyrillic (KOI8-R)
|
|
202
|
+
| "koi8u" // Cyrillic (KOI8-U)
|
|
203
|
+
| "windows1251" // Cyrillic (Windows 1251)
|
|
204
|
+
| "cp437" // DOS (CP 437)
|
|
205
|
+
| "cp850" // DOS (CP 850)
|
|
206
|
+
| "iso885913" // Estonian (ISO 8859-13)
|
|
207
|
+
| "iso88597" // Greek (ISO 8859-7)
|
|
208
|
+
| "windows1253" // Greek (Windows 1253)
|
|
209
|
+
| "iso88598" // Hebrew (ISO 8859-8)
|
|
210
|
+
| "windows1255" // Hebrew (Windows 1255)
|
|
211
|
+
| "cp932" // Japanese (CP 932)
|
|
212
|
+
| "eucjp" // Japanese (EUC-JP)
|
|
213
|
+
| "shiftjis" // Japanese (Shift JIS)
|
|
214
|
+
| "euckr" // Korean (EUC-KR)
|
|
215
|
+
| "iso885910" // Nordic (ISO 8859-10)
|
|
216
|
+
| "iso885916" // Romanian (ISO 8859-16)
|
|
217
|
+
| "iso88599" // Turkish (ISO 8859-9)
|
|
218
|
+
| "windows1254" // Turkish (Windows 1254)
|
|
219
|
+
| "utf8" // Unicode (UTF-8)
|
|
220
|
+
| "utf16le" // Unicode (UTF-16 LE)
|
|
221
|
+
| "utf16be" // Unicode (UTF-16 BE)
|
|
222
|
+
| "windows1258" // Vietnamese (Windows 1258)
|
|
223
|
+
| "iso88591" // Western (ISO 8859-1)
|
|
224
|
+
| "iso88593" // Western (ISO 8859-3)
|
|
225
|
+
| "iso885915" // Western (ISO 8859-15)
|
|
226
|
+
| "macroman" // Western (Mac Roman)
|
|
227
|
+
| "windows1252"; // Western (Windows 1252)
|
|
228
|
+
|
|
229
|
+
export interface Invisibles {
|
|
230
|
+
/**
|
|
231
|
+
* Character used to render newline characters (\n) when the `Show Invisibles`
|
|
232
|
+
* setting is enabled.
|
|
233
|
+
*/
|
|
234
|
+
eol?: boolean | string | undefined;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Character used to render leading and trailing space characters when the
|
|
238
|
+
* `Show Invisibles` setting is enabled.
|
|
239
|
+
*/
|
|
240
|
+
space?: boolean | string | undefined;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Character used to render hard tab characters (\t) when the `Show Invisibles`
|
|
244
|
+
* setting is enabled.
|
|
245
|
+
*/
|
|
246
|
+
tab?: boolean | string | undefined;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Character used to render carriage return characters (for Microsoft-style line
|
|
250
|
+
* endings) when the `Show Invisibles` setting is enabled.
|
|
251
|
+
*/
|
|
252
|
+
cr?: boolean | string | undefined;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface TestRunnerParams {
|
|
256
|
+
/**
|
|
257
|
+
* An array of paths to tests to run. Could be paths to files or directories.
|
|
258
|
+
*/
|
|
259
|
+
testPaths: string[];
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* A function that can be called to construct an instance of the atom global.
|
|
263
|
+
* No atom global will be explicitly assigned, but you can assign one in your
|
|
264
|
+
* runner if desired.
|
|
265
|
+
*/
|
|
266
|
+
buildAtomEnvironment(options: BuildEnvironmentOptions): AtomEnvironment;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* A function that builds a default instance of the application delegate,
|
|
270
|
+
* suitable to be passed as the applicationDelegate parameter to
|
|
271
|
+
* buildAtomEnvironment.
|
|
272
|
+
*/
|
|
273
|
+
buildDefaultApplicationDelegate(): object;
|
|
274
|
+
|
|
275
|
+
/** An optional path to a log file to which test output should be logged. */
|
|
276
|
+
logFile: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* A boolean indicating whether or not the tests are being run from the command
|
|
280
|
+
* line via atom --test.
|
|
281
|
+
*/
|
|
282
|
+
headless: boolean;
|
|
283
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Disposable, Package, ServiceHub } from "../index";
|
|
2
|
+
|
|
3
|
+
/** Package manager for coordinating the lifecycle of Atom packages. */
|
|
4
|
+
export interface PackageManager {
|
|
5
|
+
serviceHub: ServiceHub;
|
|
6
|
+
|
|
7
|
+
// Event Subscription
|
|
8
|
+
/** Invoke the given callback when all packages have been loaded. */
|
|
9
|
+
onDidLoadInitialPackages(callback: () => void): Disposable;
|
|
10
|
+
|
|
11
|
+
/** Invoke the given callback when all packages have been activated. */
|
|
12
|
+
onDidActivateInitialPackages(callback: () => void): Disposable;
|
|
13
|
+
|
|
14
|
+
/** Invoke the given callback when a package is activated. */
|
|
15
|
+
onDidActivatePackage(callback: (package: Package) => void): Disposable;
|
|
16
|
+
|
|
17
|
+
/** Invoke the given callback when a package is deactivated. */
|
|
18
|
+
onDidDeactivatePackage(callback: (package: Package) => void): Disposable;
|
|
19
|
+
|
|
20
|
+
/** Invoke the given callback when a package is loaded. */
|
|
21
|
+
onDidLoadPackage(callback: (package: Package) => void): Disposable;
|
|
22
|
+
|
|
23
|
+
/** Invoke the given callback when a package is unloaded. */
|
|
24
|
+
onDidUnloadPackage(callback: (package: Package) => void): Disposable;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Undocumented: Invoke the given callback when an activation hook is
|
|
28
|
+
* triggered.
|
|
29
|
+
*/
|
|
30
|
+
onDidTriggerActivationHook(hook: string, callback: () => void): Disposable;
|
|
31
|
+
|
|
32
|
+
// Package System Data
|
|
33
|
+
/** Get the path to the `ppm` command. */
|
|
34
|
+
getApmPath(): string;
|
|
35
|
+
|
|
36
|
+
/** Get the paths being used to look for packages. */
|
|
37
|
+
getPackageDirPaths(): string[];
|
|
38
|
+
|
|
39
|
+
// General Package Data
|
|
40
|
+
/** Resolve the given package name to a path on disk. */
|
|
41
|
+
resolvePackagePath(name: string): string | undefined;
|
|
42
|
+
|
|
43
|
+
/** Is the package with the given name bundled with Atom? */
|
|
44
|
+
isBundledPackage(name: string): boolean;
|
|
45
|
+
|
|
46
|
+
// Enabling and Disabling Packages
|
|
47
|
+
/** Enable the package with the given name. */
|
|
48
|
+
enablePackage(name: string): Package | undefined;
|
|
49
|
+
|
|
50
|
+
/** Disable the package with the given name. */
|
|
51
|
+
disablePackage(name: string): Package | undefined;
|
|
52
|
+
|
|
53
|
+
/** Is the package with the given name disabled? */
|
|
54
|
+
isPackageDisabled(name: string): boolean;
|
|
55
|
+
|
|
56
|
+
// Accessing Active Packages
|
|
57
|
+
/** Get an Array of all the active Packages. */
|
|
58
|
+
getActivePackages(): Package[];
|
|
59
|
+
|
|
60
|
+
/** Get the active Package with the given name. */
|
|
61
|
+
getActivePackage(name: string): Package | undefined;
|
|
62
|
+
|
|
63
|
+
/** Is the Package with the given name active? */
|
|
64
|
+
isPackageActive(name: string): boolean;
|
|
65
|
+
|
|
66
|
+
/** Returns a boolean indicating whether package activation has occurred. */
|
|
67
|
+
hasActivatedInitialPackages(): boolean;
|
|
68
|
+
|
|
69
|
+
// Accessing Loaded Packages
|
|
70
|
+
/** Get an Array of all the loaded Packages. */
|
|
71
|
+
getLoadedPackages(): Package[];
|
|
72
|
+
|
|
73
|
+
/** Get the loaded Package with the given name. */
|
|
74
|
+
getLoadedPackage(name: string): Package | undefined;
|
|
75
|
+
|
|
76
|
+
/** Is the package with the given name loaded? */
|
|
77
|
+
isPackageLoaded(name: string): boolean;
|
|
78
|
+
|
|
79
|
+
/** Returns a boolean indicating whether package loading has occurred. */
|
|
80
|
+
hasLoadedInitialPackages(): boolean;
|
|
81
|
+
|
|
82
|
+
// Accessing Available Packages
|
|
83
|
+
/** Returns an Array of strings of all the available package paths. */
|
|
84
|
+
getAvailablePackagePaths(): string[];
|
|
85
|
+
|
|
86
|
+
/** Returns an Array of strings of all the available package names. */
|
|
87
|
+
getAvailablePackageNames(): string[];
|
|
88
|
+
|
|
89
|
+
/** Returns an Array of strings of all the available package metadata. */
|
|
90
|
+
getAvailablePackageMetadata(): string[];
|
|
91
|
+
|
|
92
|
+
/** Activate a single package by name or path. */
|
|
93
|
+
activatePackage(nameOrPath: string): Promise<Package>;
|
|
94
|
+
|
|
95
|
+
/** Deactivate a single package by name or path. */
|
|
96
|
+
deactivatePackage(nameOrPath: string, suppressSerialization?: boolean): Promise<void>;
|
|
97
|
+
|
|
98
|
+
/** Triggers the given package activation hook. */
|
|
99
|
+
triggerActivationHook(hook: string): void;
|
|
100
|
+
|
|
101
|
+
/** Trigger all queued activation hooks immediately. */
|
|
102
|
+
triggerDeferredActivationHooks(): void;
|
|
103
|
+
}
|
package/src/package.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Disposable } from "../index";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Loads and activates a package's main module and resources such as
|
|
5
|
+
* stylesheets, keymaps, grammar, editor properties, and menus.
|
|
6
|
+
*/
|
|
7
|
+
export 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
|
+
* Returns whether all native modules depended on by this package are
|
|
21
|
+
* correctly compiled against the current version of Pulsar.
|
|
22
|
+
*/
|
|
23
|
+
isCompatible(): boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Rebuild native modules in this package's dependencies for the current
|
|
27
|
+
* version of Pulsar.
|
|
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
|
+
}
|