diff --git a/lib/OnyxUtils.ts b/lib/OnyxUtils.ts index d8c45a46..ec966aca 100644 --- a/lib/OnyxUtils.ts +++ b/lib/OnyxUtils.ts @@ -1418,4 +1418,6 @@ const OnyxUtils = { getEvictionBlocklist, }; +export type {OnyxMethod}; + export default OnyxUtils; diff --git a/lib/types.ts b/lib/types.ts index 67b1f5fc..ea939a9b 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -2,6 +2,7 @@ import type {Merge} from 'type-fest'; import type {BuiltIns} from 'type-fest/source/internal'; import type OnyxUtils from './OnyxUtils'; import type {WithOnyxInstance, WithOnyxState} from './withOnyx/types'; +import type {OnyxMethod} from './OnyxUtils'; /** * Utility type that excludes `null` from the type `TValue`. @@ -396,7 +397,6 @@ type OnyxMergeInput = OnyxInput; type OnyxMergeCollectionInput = Collection>, TMap>; type OnyxMethodMap = typeof OnyxUtils.METHOD; -type OnyxMethod = OnyxMethodMap[keyof OnyxMethodMap]; // Maps onyx methods to their corresponding value types type OnyxMethodValueMap = {