@nxtedition/deepstream.io-client-js 32.0.10 → 32.0.11

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": "@nxtedition/deepstream.io-client-js",
3
- "version": "32.0.10",
3
+ "version": "32.0.11",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -109,6 +109,7 @@ expectAssignable<string>(await ds.record.get('p', 'p1', { signal: new AbortContr
109
109
  expectAssignable<string>(await ds.record.get('p', { path: 'p1' }))
110
110
  expectAssignable<string | undefined>(await ds.record.get('p', 'p2'))
111
111
  expectAssignable<unknown>(await ds.record.get('p', 'x1'))
112
+ expectAssignable<string | undefined>(await ds.record.get('possiblyEmpty', 'pe1'))
112
113
 
113
114
  // observe with options
114
115
  expectAssignable<Observable<{ p1: string; p2?: string; p3: { p4: string } }>>(
@@ -1,6 +1,15 @@
1
1
  import type RecordHandler from './record-handler.js'
2
- import type { Get } from 'type-fest'
3
- export type { Get, Paths } from 'type-fest'
2
+ import type { Get as _Get, AllUnionFields } from 'type-fest'
3
+ export type { Paths } from 'type-fest'
4
+
5
+ // HACK: Wrap type-fest's Get to get rid of EmptyObject from union
6
+ type RemoveSymbolKeys<T> = {
7
+ [K in keyof T as K extends symbol ? never : K]: T[K]
8
+ }
9
+ export type Get<BaseType, Path extends string | readonly string[]> = _Get<
10
+ RemoveSymbolKeys<AllUnionFields<BaseType>>,
11
+ Path
12
+ >
4
13
 
5
14
  export interface WhenOptions {
6
15
  signal?: AbortSignal