Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zirgulis committed Nov 22, 2024
1 parent 5091684 commit 3f3a0cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/OnyxUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1418,4 +1418,6 @@ const OnyxUtils = {
getEvictionBlocklist,
};

export type {OnyxMethod};

export default OnyxUtils;
2 changes: 1 addition & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -396,7 +397,6 @@ type OnyxMergeInput<TKey extends OnyxKey> = OnyxInput<TKey>;
type OnyxMergeCollectionInput<TKey extends OnyxKey, TMap = object> = Collection<TKey, NonNullable<OnyxInput<TKey>>, TMap>;

type OnyxMethodMap = typeof OnyxUtils.METHOD;
type OnyxMethod = OnyxMethodMap[keyof OnyxMethodMap];

// Maps onyx methods to their corresponding value types
type OnyxMethodValueMap = {
Expand Down

0 comments on commit 3f3a0cb

Please sign in to comment.