assign-gingerly 0.0.83 → 0.0.84
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.
|
@@ -224,7 +224,14 @@ export interface WeakRefConfig<TProps = any> {
|
|
|
224
224
|
/**
|
|
225
225
|
* Properties to automatically wrap in WeakRef
|
|
226
226
|
*/
|
|
227
|
-
properties
|
|
227
|
+
properties?: Array<keyof TProps & string>;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Array-valued properties whose elements should be stored as WeakRefs.
|
|
231
|
+
* When accessed, the getter returns a new array with each WeakRef dereferenced.
|
|
232
|
+
* Collected elements appear as `undefined` in their original positions.
|
|
233
|
+
*/
|
|
234
|
+
listProperties?: Array<keyof TProps & string>;
|
|
228
235
|
|
|
229
236
|
/**
|
|
230
237
|
* Logging behavior when deref returns null/undefined
|
package/package.json
CHANGED
package/resolve/getValues.js
CHANGED
|
@@ -96,6 +96,8 @@ function resolveSubstitutions(substitutions, source, options) {
|
|
|
96
96
|
const resolved = getValue(path, source, options
|
|
97
97
|
? { ...options, substitutions: undefined, root: undefined }
|
|
98
98
|
: undefined);
|
|
99
|
+
if (resolved === null || typeof resolved === 'undefined')
|
|
100
|
+
continue;
|
|
99
101
|
if (typeof resolved !== 'string') {
|
|
100
102
|
throw new Error(`Substitution '${name}' must resolve to a string, got ${typeof resolved}`);
|
|
101
103
|
}
|
package/resolve/getValues.ts
CHANGED
|
@@ -122,6 +122,7 @@ function resolveSubstitutions(
|
|
|
122
122
|
? { ...options, substitutions: undefined, root: undefined }
|
|
123
123
|
: undefined
|
|
124
124
|
);
|
|
125
|
+
if(resolved === null || typeof resolved === 'undefined') continue;
|
|
125
126
|
if (typeof resolved !== 'string') {
|
|
126
127
|
throw new Error(
|
|
127
128
|
`Substitution '${name}' must resolve to a string, got ${typeof resolved}`
|