@naturalcycles/js-lib 14.221.0 → 14.223.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.
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { Promisable } from './typeFest';
2
3
  /**
3
4
  * Map from String to String (or <T>).
@@ -192,6 +193,9 @@ export type Integer = number;
192
193
  * data: (number | null)[]
193
194
  */
194
195
  export type NullableNumber = number | null;
196
+ export type NullableString = string | null;
197
+ export type NullableBoolean = boolean | null;
198
+ export type NullableBuffer = Buffer | null;
195
199
  /**
196
200
  * Used as a compact representation of truthy value.
197
201
  * undefined ('' or other short falsy value) should be used as falsy value.
@@ -258,3 +262,12 @@ export declare const _objectAssign: <T extends AnyObject>(target: T, part: Parti
258
262
  export type ErrorDataTuple<T = unknown, ERR = Error> = [err: null, data: T] | [err: ERR, data: null];
259
263
  export type SortDirection = 'asc' | 'desc';
260
264
  export type Inclusiveness = '()' | '[]' | '[)' | '(]';
265
+ /**
266
+ * @experimental
267
+ */
268
+ export interface CommonClient extends AsyncDisposable {
269
+ connected: boolean;
270
+ connect: () => Promise<void>;
271
+ disconnect: () => Promise<void>;
272
+ ping: () => Promise<void>;
273
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.221.0",
3
+ "version": "14.223.0",
4
4
  "scripts": {
5
5
  "prepare": "husky",
6
6
  "build-prod": "build-prod-esm-cjs",
package/src/types.ts CHANGED
@@ -251,6 +251,9 @@ export type Integer = number
251
251
  * data: (number | null)[]
252
252
  */
253
253
  export type NullableNumber = number | null
254
+ export type NullableString = string | null
255
+ export type NullableBoolean = boolean | null
256
+ export type NullableBuffer = Buffer | null
254
257
 
255
258
  /**
256
259
  * Used as a compact representation of truthy value.
@@ -336,3 +339,13 @@ export type ErrorDataTuple<T = unknown, ERR = Error> = [err: null, data: T] | [e
336
339
  export type SortDirection = 'asc' | 'desc'
337
340
 
338
341
  export type Inclusiveness = '()' | '[]' | '[)' | '(]'
342
+
343
+ /**
344
+ * @experimental
345
+ */
346
+ export interface CommonClient extends AsyncDisposable {
347
+ connected: boolean
348
+ connect: () => Promise<void>
349
+ disconnect: () => Promise<void>
350
+ ping: () => Promise<void>
351
+ }