@augment-vir/common 29.1.2 → 29.1.3
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.
|
@@ -7,7 +7,7 @@ const tuple_1 = require("../tuple");
|
|
|
7
7
|
const filter_object_1 = require("./filter-object");
|
|
8
8
|
const map_object_1 = require("./map-object");
|
|
9
9
|
function shouldPreserve(input) {
|
|
10
|
-
return (0, run_time_assertions_1.isPrimitive)(input) || input instanceof RegExp;
|
|
10
|
+
return (0, run_time_assertions_1.isPrimitive)(input) || input instanceof RegExp || input instanceof Promise;
|
|
11
11
|
}
|
|
12
12
|
function selectFrom(originalObject, selectionSet) {
|
|
13
13
|
if (Array.isArray(originalObject)) {
|
|
@@ -3,7 +3,7 @@ import { isLengthAtLeast } from '../tuple';
|
|
|
3
3
|
import { omitObjectKeys } from './filter-object';
|
|
4
4
|
import { mapObjectValues } from './map-object';
|
|
5
5
|
function shouldPreserve(input) {
|
|
6
|
-
return isPrimitive(input) || input instanceof RegExp;
|
|
6
|
+
return isPrimitive(input) || input instanceof RegExp || input instanceof Promise;
|
|
7
7
|
}
|
|
8
8
|
export function selectFrom(originalObject, selectionSet) {
|
|
9
9
|
if (Array.isArray(originalObject)) {
|
|
@@ -5,7 +5,7 @@ import { AnyObject } from './any-object';
|
|
|
5
5
|
import { KeyCount } from './key-count';
|
|
6
6
|
import { PropertyValueType } from './object';
|
|
7
7
|
/** All types that won't be recursed into when defining a {@link SelectionSet}. */
|
|
8
|
-
export type SelectionTypesToPreserve = Primitive | RegExp
|
|
8
|
+
export type SelectionTypesToPreserve = Primitive | RegExp | Promise<any>;
|
|
9
9
|
/** A generic selection set without specific keys. */
|
|
10
10
|
export type GenericSelectionSet = {
|
|
11
11
|
[Key in PropertyKey]: boolean | GenericSelectionSet | unknown;
|