cdeops 0.0.2-alpha.0

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.
@@ -0,0 +1,16 @@
1
+ // Proposed
2
+ /**
3
+ * This is the place for API experiments and proposals.
4
+ * These API are NOT stable and subject to change. They are only available in the Insiders
5
+ * distribution and CANNOT be used in published extensions.
6
+ *
7
+ * To test these API in local environment:
8
+ * - Use Insiders release of VS Code.
9
+ * - Add `"enableProposedApi": true` to your package.json.
10
+ * - Copy this file to your project.
11
+ */
12
+
13
+ declare module 'cdeops' {
14
+
15
+
16
+ }
package/src/index.js ADDED
@@ -0,0 +1,9 @@
1
+ // This is the module that is bundled with extensions when they use `import ... from 'cdeops'` or
2
+ // `require('cdeops')`. It delegates to the extension host's runtime implementation of this module by calling
3
+ // `global.require` (which ensures that the extension host's `require` is called at runtime).
4
+ //
5
+ // This dummy file is used when extension is bundled with a JavaScript bundler that lacks support for externals
6
+ // (or when `cdeops` is not configured as an external module). Parcel does not support extenals
7
+ // (https://github.com/parcel-bundler/parcel/issues/144). Webpack, Rollup, and Microbundle support externals.
8
+
9
+ module.exports = global.require('cdeops')
@@ -0,0 +1,63 @@
1
+
2
+
3
+ declare module 'cdeops' {
4
+
5
+ export interface Unsubscribable {
6
+ unsubscribe(): void;
7
+ }
8
+
9
+ /** Support types for {@link Subscribable}. */
10
+ interface NextObserver<T> {
11
+ closed?: boolean
12
+ next: (value: T) => void
13
+ error?: (err: any) => void
14
+ complete?: () => void
15
+ }
16
+ interface ErrorObserver<T> {
17
+ closed?: boolean
18
+ next?: (value: T) => void
19
+ error: (err: any) => void
20
+ complete?: () => void
21
+ }
22
+ interface CompletionObserver<T> {
23
+ closed?: boolean
24
+ next?: (value: T) => void
25
+ error?: (err: any) => void
26
+ complete: () => void
27
+ }
28
+ type PartialObserver<T> = NextObserver<T> | ErrorObserver<T> | CompletionObserver<T>
29
+
30
+ /**
31
+ * A stream of values that may be subscribed to.
32
+ */
33
+ export interface Subscribable<T> {
34
+ /**
35
+ * Subscribes to the stream of values.
36
+ *
37
+ * @returns An unsubscribable that, when its {@link Unsubscribable#unsubscribe} method is called, causes
38
+ * the subscription to stop reacting to the stream.
39
+ */
40
+ subscribe(observer?: PartialObserver<T>): Unsubscribable
41
+ /** @deprecated Use an observer instead of a complete callback */
42
+ subscribe(next: null | undefined, error: null | undefined, complete: () => void): Unsubscribable
43
+ /** @deprecated Use an observer instead of an error callback */
44
+ subscribe(next: null | undefined, error: (error: any) => void, complete?: (() => void) | null): Unsubscribable
45
+ /** @deprecated Use an observer instead of a complete callback */
46
+ subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Unsubscribable
47
+ subscribe(
48
+ next?: ((value: T) => void) | null,
49
+ error?: ((error: any) => void) | null,
50
+ complete?: (() => void) | null
51
+ ): Unsubscribable
52
+ }
53
+
54
+ // /**
55
+ // * A provider result represents the values that a provider, such as the {@link HoverProvider}, may return. The
56
+ // * result may be a single value, a Promise that resolves to a single value, or a Subscribable that emits zero
57
+ // * or more values.
58
+ // */
59
+ // export type ProviderResult<T> =
60
+
61
+
62
+
63
+ }