react-native-onyx 2.0.40 → 2.0.41

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/useOnyx.d.ts CHANGED
@@ -4,7 +4,7 @@ import type { CollectionKeyBase, KeyValueMapping, NonNull, OnyxCollection, OnyxE
4
4
  * Represents a Onyx value that can be either a single entry or a collection of entries, depending on the `TKey` provided.
5
5
  * It's a variation of `OnyxValue` type that is read-only and excludes the `null` type.
6
6
  */
7
- type UseOnyxValue<TKey extends OnyxKey> = string extends TKey ? unknown : TKey extends CollectionKeyBase ? Readonly<NonNull<OnyxCollection<KeyValueMapping[TKey]>>> : Readonly<NonNull<OnyxEntry<KeyValueMapping[TKey]>>>;
7
+ type UseOnyxValue<TKey extends OnyxKey> = string extends TKey ? unknown : TKey extends CollectionKeyBase ? NonNull<OnyxCollection<KeyValueMapping[TKey]>> : NonNull<OnyxEntry<KeyValueMapping[TKey]>>;
8
8
  type BaseUseOnyxOptions = {
9
9
  /**
10
10
  * Determines if this key in this subscription is safe to be evicted.
@@ -35,7 +35,7 @@ type UseOnyxSelectorOption<TKey extends OnyxKey, TReturnValue> = {
35
35
  selector?: Selector<TKey, unknown, TReturnValue>;
36
36
  };
37
37
  type FetchStatus = 'loading' | 'loaded';
38
- type CachedValue<TKey extends OnyxKey, TValue> = IsEqual<TValue, UseOnyxValue<TKey>> extends true ? TValue : TKey extends CollectionKeyBase ? Readonly<NonNullable<OnyxCollection<TValue>>> : Readonly<TValue>;
38
+ type CachedValue<TKey extends OnyxKey, TValue> = IsEqual<TValue, UseOnyxValue<TKey>> extends true ? TValue : TKey extends CollectionKeyBase ? NonNullable<OnyxCollection<TValue>> : TValue;
39
39
  type ResultMetadata = {
40
40
  status: FetchStatus;
41
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "2.0.40",
3
+ "version": "2.0.41",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",