@dxos/typings 0.1.55-main.ff36828 → 0.1.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/typings",
3
- "version": "0.1.55-main.ff36828",
3
+ "version": "0.1.55",
4
4
  "description": "Typescript defs for various base packages",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -174,15 +174,19 @@ declare module 'hypercore' {
174
174
  // https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedstats
175
175
  readonly stats: Stats;
176
176
 
177
- bitfield?: {
178
- data: any; // sparse-bitfield package
179
-
180
- // TODO(dmaretskyi): More props.
181
- };
177
+ bitfield?: HypercoreBitfield;
182
178
 
183
179
  readonly sparse: boolean;
184
180
  }
185
181
 
182
+ export interface HypercoreBitfield {
183
+ data: any; // sparse-bitfield package
184
+
185
+ total(start: number, end: number): number;
186
+
187
+ // TODO(dmaretskyi): More props.
188
+ }
189
+
186
190
  /**
187
191
  * Raw hypercore feed.
188
192
  * https://github.com/hypercore-protocol/hypercore/blob/v9.12.0/index.js#L53
package/src/streamx.d.ts CHANGED
@@ -49,6 +49,11 @@ declare module 'streamx' {
49
49
  export class Readable extends Stream implements IReadable {
50
50
  constructor(args?: any);
51
51
 
52
+ _open(cb: (err: Error | null) => void);
53
+ _read(cb: (err: Error | null) => void);
54
+
55
+ push(chunk: any);
56
+
52
57
  pipe(dest: Writable, cb?: Callback);
53
58
  }
54
59