@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.
Files changed (87) hide show
  1. package/.github/workflows/publish.yml +33 -0
  2. package/LICENSE.md +8 -0
  3. package/README.md +187 -0
  4. package/atom-i18n/config.d.ts +9 -0
  5. package/atom-i18n/index.d.ts +4 -0
  6. package/autocomplete-plus/config.d.ts +140 -0
  7. package/autocomplete-plus/index.d.ts +200 -0
  8. package/dependencies/event-kit/index.d.ts +143 -0
  9. package/dependencies/first-mate/index.d.ts +1 -0
  10. package/dependencies/first-mate/src/first-mate.d.ts +1 -0
  11. package/dependencies/first-mate/src/grammar.d.ts +119 -0
  12. package/dependencies/pathwatcher/index.d.ts +1 -0
  13. package/dependencies/pathwatcher/src/directory.d.ts +98 -0
  14. package/dependencies/pathwatcher/src/file.d.ts +115 -0
  15. package/dependencies/pathwatcher/src/main.d.ts +2 -0
  16. package/dependencies/service-hub/index.d.ts +3 -0
  17. package/dependencies/service-hub/src/consumer.d.ts +8 -0
  18. package/dependencies/service-hub/src/provider.d.ts +14 -0
  19. package/dependencies/service-hub/src/service-hub.d.ts +46 -0
  20. package/dependencies/service-hub/src/util.d.ts +1 -0
  21. package/dependencies/text-buffer/index.d.ts +1 -0
  22. package/dependencies/text-buffer/src/display-marker-layer.d.ts +182 -0
  23. package/dependencies/text-buffer/src/display-marker.d.ts +232 -0
  24. package/dependencies/text-buffer/src/helpers.d.ts +11 -0
  25. package/dependencies/text-buffer/src/marker-layer.d.ts +117 -0
  26. package/dependencies/text-buffer/src/marker.d.ts +207 -0
  27. package/dependencies/text-buffer/src/point.d.ts +102 -0
  28. package/dependencies/text-buffer/src/range.d.ts +141 -0
  29. package/dependencies/text-buffer/src/text-buffer.d.ts +759 -0
  30. package/index.d.ts +72 -0
  31. package/linter/config.d.ts +26 -0
  32. package/linter/index.d.ts +108 -0
  33. package/package.json +61 -0
  34. package/src/atom-environment.d.ts +361 -0
  35. package/src/branding.d.ts +19 -0
  36. package/src/buffered-node-process.d.ts +10 -0
  37. package/src/buffered-process.d.ts +88 -0
  38. package/src/clipboard.d.ts +14 -0
  39. package/src/color.d.ts +11 -0
  40. package/src/command-registry.d.ts +118 -0
  41. package/src/config-schema.d.ts +271 -0
  42. package/src/config.d.ts +168 -0
  43. package/src/context-menu-manager.d.ts +65 -0
  44. package/src/cursor.d.ts +252 -0
  45. package/src/decoration.d.ts +156 -0
  46. package/src/deserializer-manager.d.ts +15 -0
  47. package/src/dock.d.ts +121 -0
  48. package/src/get-window-load-settings.d.ts +26 -0
  49. package/src/git-repository.d.ts +174 -0
  50. package/src/grammar-registry.d.ts +241 -0
  51. package/src/gutter.d.ts +118 -0
  52. package/src/history-manager.d.ts +28 -0
  53. package/src/keymap-extensions.d.ts +190 -0
  54. package/src/language-mode.d.ts +314 -0
  55. package/src/layer-decoration.d.ts +31 -0
  56. package/src/menu-manager.d.ts +24 -0
  57. package/src/notification-manager.d.ts +37 -0
  58. package/src/notification.d.ts +79 -0
  59. package/src/other-types.d.ts +283 -0
  60. package/src/package-manager.d.ts +103 -0
  61. package/src/package.d.ts +33 -0
  62. package/src/pane.d.ts +604 -0
  63. package/src/panel.d.ts +38 -0
  64. package/src/path-watcher.d.ts +35 -0
  65. package/src/project.d.ts +110 -0
  66. package/src/scope-descriptor.d.ts +8 -0
  67. package/src/selection.d.ts +341 -0
  68. package/src/style-manager.d.ts +68 -0
  69. package/src/task.d.ts +38 -0
  70. package/src/text-editor-component.d.ts +15 -0
  71. package/src/text-editor-element.d.ts +48 -0
  72. package/src/text-editor-registry.d.ts +48 -0
  73. package/src/text-editor.d.ts +1416 -0
  74. package/src/theme-manager.d.ts +29 -0
  75. package/src/tooltip-manager.d.ts +42 -0
  76. package/src/tooltip.d.ts +63 -0
  77. package/src/ui.d.ts +101 -0
  78. package/src/view-registry.d.ts +34 -0
  79. package/src/wasm-tree-sitter-grammar.d.ts +305 -0
  80. package/src/wasm-tree-sitter-language-mode.d.ts +294 -0
  81. package/src/workspace-center.d.ts +117 -0
  82. package/src/workspace.d.ts +485 -0
  83. package/status-bar/config.d.ts +23 -0
  84. package/status-bar/index.d.ts +51 -0
  85. package/tool-bar/config.d.ts +20 -0
  86. package/tool-bar/index.d.ts +235 -0
  87. package/tsconfig.json +8 -0
@@ -0,0 +1,143 @@
1
+ export interface DisposableLike {
2
+ dispose(): void;
3
+ }
4
+
5
+ /** A handle to a resource that can be disposed. */
6
+ export class Disposable implements DisposableLike {
7
+ /** Ensure that Object correctly implements the Disposable contract. */
8
+ static isDisposable(object: object): boolean;
9
+
10
+ /** Construct a Disposable. */
11
+ constructor(disposableAction?: () => void);
12
+
13
+ /** A callback which will be called within dispose(). */
14
+ disposalAction?(): void;
15
+
16
+ /**
17
+ * Perform the disposal action, indicating that the resource associated with
18
+ * this disposable is no longer needed.
19
+ */
20
+ dispose(): void;
21
+ }
22
+
23
+ /**
24
+ * An object that aggregates multiple {@link Disposable} instances together
25
+ * into a single disposable, so they can all be disposed as a group.
26
+ */
27
+ export class CompositeDisposable implements DisposableLike {
28
+ /** Construct an instance, optionally with one or more disposables. */
29
+ constructor(...disposables: DisposableLike[]);
30
+
31
+ /**
32
+ * Dispose all disposables added to this composite disposable.
33
+ *
34
+ * If this object has already been disposed, this method has no effect.
35
+ */
36
+ dispose(): void;
37
+
38
+ // Managing Disposables
39
+
40
+ /**
41
+ * Add disposables to be disposed when the composite is disposed.
42
+ *
43
+ * If this object has already been disposed, this method has no effect.
44
+ */
45
+ add(...disposables: DisposableLike[]): void;
46
+
47
+ /** Remove a previously added disposable. */
48
+ remove(disposable: DisposableLike): void;
49
+
50
+ /** Alias of {@link remove}. */
51
+ delete(disposable: DisposableLike): void;
52
+
53
+ /**
54
+ * Clear all disposables without disposing them.
55
+ *
56
+ * They will not be disposed by the next call to {@link dispose}.
57
+ */
58
+ clear(): void;
59
+ }
60
+
61
+ /**
62
+ * Utility class to be used when implementing event-based APIs that allows
63
+ * for handlers registered via {@link on} to be invoked with calls to
64
+ * {@link emit}.
65
+ */
66
+ export class Emitter<
67
+ OptionalEmissions = { [key: string]: any },
68
+ RequiredEmissions = {}
69
+ > implements DisposableLike {
70
+ /** Construct an emitter. */
71
+ constructor();
72
+
73
+ /** Clear out any existing subscribers. */
74
+ clear(): void;
75
+
76
+ /** Unsubscribe all handlers. */
77
+ dispose(): boolean;
78
+
79
+ // Event Subscription
80
+ /** Registers a handler to be invoked whenever the given event is emitted. */
81
+ on<T extends keyof OptionalEmissions>(
82
+ eventName: T,
83
+ handler: (value?: OptionalEmissions[T]) => void
84
+ ): Disposable;
85
+
86
+ /** Registers a handler to be invoked whenever the given event is emitted. */
87
+ on<T extends keyof RequiredEmissions>(
88
+ eventName: T,
89
+ handler: (value: RequiredEmissions[T]) => void
90
+ ): Disposable;
91
+
92
+ /**
93
+ * Register the given handler function to be invoked the next time an event
94
+ * with the given name is emitted via ::emit.
95
+ */
96
+ once<T extends keyof OptionalEmissions>(
97
+ eventName: T,
98
+ handler: (value?: OptionalEmissions[T]) => void
99
+ ): Disposable;
100
+
101
+ /**
102
+ * Register the given handler function to be invoked the next time an event
103
+ * with the given name is emitted via ::emit.
104
+ */
105
+ once<T extends keyof RequiredEmissions>(
106
+ eventName: T,
107
+ handler: (value: RequiredEmissions[T]) => void
108
+ ): Disposable;
109
+
110
+ /**
111
+ * Register the given handler function to be invoked before all other
112
+ * handlers existing at the time of subscription whenever events by the
113
+ * given name are emitted via ::emit.
114
+ */
115
+ preempt<T extends keyof OptionalEmissions>(
116
+ eventName: T,
117
+ handler: (value?: OptionalEmissions[T]) => void,
118
+ ): Disposable;
119
+
120
+ /**
121
+ * Register the given handler function to be invoked before all other
122
+ * handlers existing at the time of subscription whenever events by the
123
+ * given name are emitted via ::emit.
124
+ */
125
+ preempt<T extends keyof RequiredEmissions>(
126
+ eventName: T,
127
+ handler: (value: RequiredEmissions[T]) => void,
128
+ ): Disposable;
129
+
130
+ // Event Emission
131
+
132
+ /** Invoke the handlers registered via ::on for the given event name. */
133
+ emit<T extends keyof OptionalEmissions>(
134
+ eventName: T,
135
+ value?: OptionalEmissions[T]
136
+ ): void;
137
+
138
+ /** Invoke the handlers registered via ::on for the given event name. */
139
+ emit<T extends keyof RequiredEmissions>(
140
+ eventName: T,
141
+ value: RequiredEmissions[T]
142
+ ): void;
143
+ }
@@ -0,0 +1 @@
1
+ export * from "./src/first-mate";
@@ -0,0 +1 @@
1
+ export * from "./grammar";
@@ -0,0 +1,119 @@
1
+ import { Disposable } from "../../../index";
2
+
3
+ /**
4
+ * A class instance that encapsulates knowledge about language-specific tasks
5
+ * like syntax highlighting.
6
+ *
7
+ * A `Grammar` knows how translate raw text in a given language into
8
+ * syntax-highlighted text. The exact implementation details of how this is
9
+ * done may vary.
10
+ *
11
+ * The two currently supported types of grammar in Pulsar are `Grammar`
12
+ * (representing the original type of grammar that uses TextMate-style grammar
13
+ * definitions to parse code) and `WASMTreeSitterGrammar` (a newer style of
14
+ * grammar which uses Tree-sitter to parse code).
15
+ *
16
+ * A grammar has a human-readable name and an internal identifier that doubles
17
+ * as its "root" scope name. (For instance: the `name` of the JavaScript grammar
18
+ * is `"JavaScript"`; its `scopeName` is `"source.js"`.) You may find it useful
19
+ * to use the former (for text shown to the user) or the latter (for keeping
20
+ * track of grammar-specific concerns within your package).
21
+ *
22
+ * This object, `Grammar`, describes the original TextMate-style grammar
23
+ * implementation, but also serves as an abstract interface that is fulfilled
24
+ * by `WASMTreeSitterGrammar`. If you don't know which kind of grammar you are
25
+ * working with, play it safe and use only what's available on {@link Grammar};
26
+ * but if your package is designed to use Tree-sitter features, you may treat
27
+ * a grammar as a `WASMTreeSitterGrammar` once you've done type-narrowing to
28
+ * tell them apart. (A predicate function for telling them apart need only
29
+ * look at `someGrammar.constructor.name`.)
30
+ */
31
+ export interface Grammar {
32
+ /** The name of the Grammar. */
33
+ readonly name: string;
34
+
35
+ /** Undocumented: scope name of the Grammar. */
36
+ readonly scopeName: string;
37
+
38
+ // Event Subscription
39
+
40
+ onDidUpdate(callback: () => void): Disposable;
41
+
42
+ // Tokenizing
43
+
44
+ /**
45
+ * Tokenize all lines in the given text.
46
+ *
47
+ * @param text A string containing one or more lines.
48
+ * @return An array of token arrays for each line tokenized.
49
+ */
50
+ tokenizeLines(text: string): GrammarToken[][];
51
+
52
+ /**
53
+ * Tokenizes the line of text.
54
+ *
55
+ * @param line A string of text to tokenize.
56
+ * @param ruleStack An optional array of rules previously returned from this
57
+ * method. This should be null when tokenizing the first line in the file.
58
+ * @param firstLine A optional boolean denoting whether this is the first
59
+ * line in the file which defaults to `false`.
60
+ * @return An object representing the result of the tokenize.
61
+ */
62
+ tokenizeLine(line: string, ruleStack?: null, firstLine?: boolean): TokenizeLineResult;
63
+
64
+ /**
65
+ * Tokenizes the line of text.
66
+ *
67
+ * @param line A string of text to tokenize.
68
+ * @param ruleStack An optional array of rules previously returned from this
69
+ * method. This should be null when tokenizing the first line in the file.
70
+ * @param firstLine A optional boolean denoting whether this is the first
71
+ * line in the file which defaults to `false`.
72
+ * @return An object representing the result of the tokenize.
73
+ */
74
+ tokenizeLine(line: string, ruleStack: GrammarRule[], firstLine?: false): TokenizeLineResult;
75
+ }
76
+
77
+ export interface GrammarToken {
78
+ value: string;
79
+ scopes: string[];
80
+ }
81
+
82
+ export interface GrammarRule {
83
+ // https://github.com/atom/first-mate/blob/v7.0.7/src/rule.coffee
84
+ // This is private. Don't go down the rabbit hole.
85
+ rule: object;
86
+ scopeName: string;
87
+ contentScopeName: string;
88
+ }
89
+
90
+ /** Result returned by `Grammar.tokenizeLine`. */
91
+ export interface TokenizeLineResult {
92
+ /** The string of text that was tokenized. */
93
+ line: string;
94
+
95
+ /**
96
+ * An array of integer scope IDs and strings.
97
+ *
98
+ * Positive IDs indicate the beginning of a scope, and negative tags indicate
99
+ * the end.
100
+ *
101
+ * To resolve ids to scope names, call {@link GrammarRegistry#scopeForId}
102
+ * with the absolute value of the id.
103
+ */
104
+ tags: Array<number | string>;
105
+
106
+ /**
107
+ * This is a dynamic property. Invoking it will incur additional overhead,
108
+ * but will automatically translate the `tags` into token objects with
109
+ * `value` and `scopes` properties.
110
+ */
111
+ tokens: GrammarToken[];
112
+
113
+ /**
114
+ * An array of rules representing the tokenized state at the end of the line.
115
+ * These should be passed back into this method when tokenizing the next line
116
+ * in the file.
117
+ */
118
+ ruleStack: GrammarRule[];
119
+ }
@@ -0,0 +1 @@
1
+ export * from "./src/main";
@@ -0,0 +1,98 @@
1
+ import { Disposable } from "../../../index";
2
+ import { File } from "./file";
3
+
4
+ /** Represents a directory on disk that can be watched for changes. */
5
+ export class Directory {
6
+ // Construction
7
+ /** Configures a new Directory instance, no files are accessed. */
8
+ constructor(directoryPath: string, symlink?: boolean);
9
+
10
+ /**
11
+ * Creates the directory on disk that corresponds to ::getPath() if no such
12
+ * directory already exists.
13
+ */
14
+ create(mode?: number): Promise<boolean>;
15
+
16
+ // Event Subscription
17
+ /** Invoke the given callback when the directory's contents change. */
18
+ onDidChange(callback: () => void): Disposable;
19
+
20
+ // Directory Metadata
21
+ /** Returns a boolean, always false. */
22
+ isFile(): this is File;
23
+
24
+ /** Returns a boolean, always true. */
25
+ isDirectory(): this is Directory;
26
+
27
+ /** Returns a boolean indicating whether or not this is a symbolic link. */
28
+ isSymbolicLink(): boolean;
29
+
30
+ /**
31
+ * Returns a promise that resolves to a boolean, true if the directory
32
+ * exists, false otherwise.
33
+ */
34
+ exists(): Promise<boolean>;
35
+
36
+ /** Returns a boolean, true if the directory exists, false otherwise. */
37
+ existsSync(): boolean;
38
+
39
+ /**
40
+ * Returns a boolean: `true` if this Directory is the root directory of the
41
+ * filesystem, or `false` if it isn't.
42
+ */
43
+ isRoot(): boolean;
44
+
45
+ // Managing Paths
46
+
47
+ /**
48
+ * This may include unfollowed symlinks or relative directory entries. Or
49
+ * it may be fully resolved, it depends on what you give it.
50
+ */
51
+ getPath(): string;
52
+
53
+ /**
54
+ * All relative directory entries are removed and symlinks are resolved to
55
+ * their final destination.
56
+ */
57
+ getRealPathSync(): string;
58
+
59
+ /** Returns the string basename of the directory. */
60
+ getBaseName(): string;
61
+
62
+ /** Returns the relative string path to the given path from this directory. */
63
+ relativize(fullPath: string): string;
64
+
65
+ // Traversing
66
+ /** Traverse to the parent directory. */
67
+ getParent(): Directory;
68
+
69
+ /**
70
+ * Traverse within this Directory to a child File. This method doesn't
71
+ * actually check to see if the File exists, it just creates the File
72
+ * object.
73
+ */
74
+ getFile(filename: string): File;
75
+
76
+ /**
77
+ * Traverse within this a Directory to a child Directory.
78
+ *
79
+ * This method doesn't actually check to see if the Directory exists, it
80
+ * just creates the Directory object.
81
+ */
82
+ getSubdirectory(dirname: string): Directory;
83
+
84
+ /** Reads file entries in this directory from disk synchronously. */
85
+ getEntriesSync(): Array<File | Directory>;
86
+
87
+ /** Reads file entries in this directory from disk asynchronously. */
88
+ getEntries(callback: (error: Error | null, entries: Array<File | Directory>) => void): void;
89
+
90
+ /**
91
+ * Determines if the given path (real or symbolic) is inside this
92
+ * directory.
93
+ *
94
+ * This method does not actually check if the path exists, it just checks
95
+ * if the path is under this directory.
96
+ */
97
+ contains(pathToCheck: string): boolean;
98
+ }
@@ -0,0 +1,115 @@
1
+ import { ReadStream, WriteStream } from "fs";
2
+ import { Disposable } from "../../../index";
3
+ import { Directory } from "./directory";
4
+
5
+ /**
6
+ * Represents an individual file that can be watched, read from, and written to.
7
+ */
8
+ export class File {
9
+ // Construction
10
+ /** Configures a new File instance, no files are accessed. */
11
+ constructor(filePath: string, symlink?: boolean);
12
+
13
+ /**
14
+ * Creates the file on disk that corresponds to {@link getPath} if no such
15
+ * file already exists.
16
+ */
17
+ create(): Promise<boolean>;
18
+
19
+ // Event Subscription
20
+ /** Invoke the given callback when the file's contents change. */
21
+ onDidChange(callback: () => void): Disposable;
22
+
23
+ /** Invoke the given callback when the file's path changes. */
24
+ onDidRename(callback: () => void): Disposable;
25
+
26
+ /** Invoke the given callback when the file is deleted. */
27
+ onDidDelete(callback: () => void): Disposable;
28
+
29
+ /**
30
+ * Invoke the given callback when there is an error with the watch. When your
31
+ * callback has been invoked, the file will have unsubscribed from the file
32
+ * watches.
33
+ */
34
+ onWillThrowWatchError(callback: (event: PathWatchErrorThrownEvent) => void): Disposable;
35
+
36
+ // File Metadata
37
+ /** Returns a boolean, always true. */
38
+ isFile(): this is File;
39
+
40
+ /** Returns a boolean, always false. */
41
+ isDirectory(): this is Directory;
42
+
43
+ /** Returns a boolean indicating whether or not this is a symbolic link. */
44
+ isSymbolicLink(): boolean;
45
+
46
+ /**
47
+ * Returns a promise that resolves to a boolean — `true` if the file exists,
48
+ * `false` otherwise.
49
+ */
50
+ exists(): Promise<boolean>;
51
+
52
+ /** Returns a boolean, `true` if the file exists, `false` otherwise. */
53
+ existsSync(): boolean;
54
+
55
+ /** Get the SHA-1 digest of this file. */
56
+ getDigest(): Promise<string>;
57
+
58
+ /** Get the SHA-1 digest of this file. */
59
+ getDigestSync(): string;
60
+
61
+ /** Sets the file's character set encoding name. */
62
+ setEncoding(encoding: string): void;
63
+
64
+ /** Returns the string encoding name for this file (default: `"utf8"`). */
65
+ getEncoding(): string;
66
+
67
+ // Managing Paths
68
+
69
+ /** Returns the string path for the file. */
70
+ getPath(): string;
71
+
72
+ /** Returns this file's completely resolved string path. */
73
+ getRealPathSync(): string;
74
+
75
+ /**
76
+ * Returns a promise that resolves to the file's completely resolved string
77
+ * path.
78
+ */
79
+ getRealPath(): Promise<string>;
80
+
81
+ /** Return the string filename without any directory information. */
82
+ getBaseName(): string;
83
+
84
+ // Traversing
85
+ /** Return the Directory that contains this file. */
86
+ getParent(): Directory;
87
+
88
+ // Reading and Writing
89
+ /** Reads the contents of the file. */
90
+ read(flushCache?: boolean): Promise<string | null>;
91
+
92
+ /** Returns a stream to read the content of the file. */
93
+ createReadStream(): ReadStream;
94
+
95
+ /** Overwrites the file with the given text. */
96
+ write(text: string): Promise<undefined>;
97
+
98
+ /** Returns a stream to write content to the file. */
99
+ createWriteStream(): WriteStream;
100
+
101
+ /** Overwrites the file with the given text. */
102
+ writeSync(text: string): undefined;
103
+ }
104
+
105
+ export interface PathWatchErrorThrownEvent {
106
+ /** The error object. */
107
+ error: Error;
108
+
109
+ /**
110
+ * Call this function to indicate you have handled the error.
111
+ *
112
+ * The error will not be thrown if this function is called.
113
+ */
114
+ handle(): void;
115
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./directory";
2
+ export * from "./file";
@@ -0,0 +1,3 @@
1
+ type Service = unknown;
2
+
3
+ export * from "./src/service-hub";
@@ -0,0 +1,8 @@
1
+ import { Range } from 'semver';
2
+ import { Service } from './util';
3
+
4
+ export interface Consumer {
5
+ keyPath: string;
6
+ callback: (service: Service) => void;
7
+ versionRange: Range;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { CompositeDisposable } from "../../event-kit";
2
+ import { SemVer } from 'semver';
3
+ import { Service } from './util';
4
+ import { Consumer } from './consumer';
5
+
6
+ export interface Provider {
7
+ consumersDisposable: CompositeDisposable;
8
+ servicesByVersion: Record<string, Service | Record<string, Service>>;
9
+ versions: SemVer[];
10
+
11
+ provide(consumer: Consumer): void;
12
+
13
+ destroy(): void;
14
+ }
@@ -0,0 +1,46 @@
1
+ import { Disposable } from '../../event-kit';
2
+ import { Consumer } from './consumer';
3
+ import { Provider } from './provider';
4
+ import { Service } from './util';
5
+
6
+ export interface ServiceHub {
7
+ providers: Provider[];
8
+ consumers: Consumer[];
9
+
10
+ /**
11
+ * Provide a service by invoking the callback of all current and future
12
+ * consumers matching the given key path and version range, passing the
13
+ * provided service object to each one.
14
+ *
15
+ * @param keyPath A string of `.`-separated keys indicating the service’s
16
+ * location in the namespace of all services.
17
+ * @param version A string containing a semantic version for the service’s
18
+ * API.
19
+ * @param service An object exposing the service API.
20
+ * @returns A {@link Disposable} on which `dispose` can be called to remove
21
+ * the provided service.
22
+ */
23
+ provide(keyPath: string, version: string, service: Service): Disposable;
24
+
25
+ /**
26
+ * Consume a service by invoking the given callback for all current and
27
+ * future provided services matching the given key path and range.
28
+ *
29
+ * @param keyPath A string of `.`-separated keys indicating the service’s
30
+ * location in the namespace of all services.
31
+ * @param version A string containing a semantic version for the service’s
32
+ * API.
33
+ * @param callback A callback that will be invoked whenever this class can
34
+ * match a provider to a consumer. Takes the provider’s service object as
35
+ * the sole argument.
36
+ * @returns A {@link Disposable} on which `dispose` can be called to remove
37
+ * the consumer.
38
+ */
39
+ consume(keyPath: string, version: string, callback: (providedService: Service) => unknown): Disposable;
40
+
41
+ /**
42
+ * Clear out all service consumes and providers, disposing of any
43
+ * {@link Disposable}s returned by previous consumers.
44
+ */
45
+ clear(): void;
46
+ }
@@ -0,0 +1 @@
1
+ export type Service = unknown;
@@ -0,0 +1 @@
1
+ export * from "./src/text-buffer";