diff --git a/index.ts b/index.ts index 02f14bec..9c54c9a7 100644 --- a/index.ts +++ b/index.ts @@ -70,7 +70,6 @@ import { symbolLinked, } from './src/globals'; import { deepMerge, getValueAtPath, initializePathType, setAtPath } from './src/helpers'; -import { runWithRetry } from './src/retry'; import { tracking } from './src/tracking'; export const internal = { @@ -90,7 +89,6 @@ export const internal = { observableFns, optimized, peek, - runWithRetry, safeParse, safeStringify, set, diff --git a/src/retry.ts b/src/sync/retry.ts similarity index 95% rename from src/retry.ts rename to src/sync/retry.ts index 9b14019a..77afe311 100644 --- a/src/retry.ts +++ b/src/sync/retry.ts @@ -1,6 +1,6 @@ -import { isPromise } from './is'; -import type { NodeInfo, RetryOptions } from './observableInterfaces'; -import type { OnErrorRetryParams, SyncedGetSetBaseParams } from './sync/syncTypes'; +import { isPromise } from '../is'; +import type { NodeInfo, RetryOptions } from '../observableInterfaces'; +import type { OnErrorRetryParams, SyncedGetSetBaseParams } from './syncTypes'; function calculateRetryDelay(retryOptions: RetryOptions, retryNum: number): number | null { const { backoff, delay = 1000, infinite, times = 3, maxDelay = 30000 } = retryOptions; diff --git a/src/sync/syncObservable.ts b/src/sync/syncObservable.ts index ccfdcb8e..29cba631 100644 --- a/src/sync/syncObservable.ts +++ b/src/sync/syncObservable.ts @@ -46,18 +46,10 @@ import type { SyncedOptions, SyncedSetParams, } from './syncTypes'; +import { runWithRetry } from './retry'; -const { - clone, - deepMerge, - getNode, - getNodeValue, - getValueAtPath, - globalState, - runWithRetry, - symbolLinked, - createPreviousHandler, -} = internal; +const { clone, deepMerge, getNode, getNodeValue, getValueAtPath, globalState, symbolLinked, createPreviousHandler } = + internal; export const mapSyncPlugins: WeakMap< ClassConstructor,