From 3f3a0cb2735608f7187797cfbbbf445f6fbbf3ff Mon Sep 17 00:00:00 2001 From: Povilas Zirgulis Date: Fri, 22 Nov 2024 21:37:46 +0200 Subject: [PATCH] code cleanup --- lib/OnyxUtils.ts | 2 ++ lib/types.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 = {