diff --git a/packages/axues/CHANGELOG.md b/packages/axues/CHANGELOG.md index b9ed614..fe73d7e 100644 --- a/packages/axues/CHANGELOG.md +++ b/packages/axues/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.1](https://github.com/rotick/axues/compare/0.6.0...0.6.1) (2023-02-19) + +### Performance Improvements + +- rename MaybeComputedRef to MaybeComputedRefWithoutFn ([b828278](https://github.com/rotick/axues/commit/b8282788e9089721ad153af07e6debc8fac8370a)) +- the type of requestConfig is changed to MaybeComputedRef ([4cdf972](https://github.com/rotick/axues/commit/4cdf972b9fc9d0d366b1f9e6c5aa51e6cc534a23)) + # [0.6.0](https://github.com/rotick/axues/compare/0.5.1...0.6.0) (2023-02-19) ### Features diff --git a/packages/axues/README.md b/packages/axues/README.md index 5de6a1d..de1213f 100644 --- a/packages/axues/README.md +++ b/packages/axues/README.md @@ -547,8 +547,10 @@ That is why axues need to be created first. ### createAxues ```typescript +type MaybeComputedRef = MaybeRef | (() => T) | ComputedRef + interface CreateAxuesOptions { - requestConfig?: () => AxiosRequestConfig + requestConfig?: MaybeComputedRef transformUseOptions?: (options: UseAxuesOptions) => UseAxuesOptions responseHandle?: (response: AxiosResponse, requestConfig: AxuesRequestConfig) => unknown errorHandle?: (err: AxiosError, requestConfig: AxuesRequestConfig) => Error @@ -578,8 +580,8 @@ declare function createAxues(axiosInstance: AxiosInstance, createOptions?: Creat ```typescript type MaybeRef = T | Ref -type MaybeComputedRef = ComputedRef | MaybeRef -type MaybeComputedOrActionRef = MaybeComputedRef | ((actionPayload?: TAction) => T) +type MaybeComputedRefWithoutFn = ComputedRef | MaybeRef +type MaybeComputedOrActionRef = MaybeComputedRefWithoutFn | ((actionPayload?: TAction) => T) interface AxuesRequestConfig extends Omit { url?: MaybeComputedOrActionRef @@ -631,7 +633,7 @@ interface UseAxuesOptions extends AxuesReques onError?: (err: Error, actionPayload?: TAction) => void onFinally?: (actionPayload?: TAction) => void } -type UseAxuesFirstArg = MaybeComputedRef | ((actionPayload?: TAction, signal?: AbortSignal) => Promise) | UseAxuesOptions +type UseAxuesFirstArg = MaybeComputedRefWithoutFn | ((actionPayload?: TAction, signal?: AbortSignal) => Promise) | UseAxuesOptions interface UseAxuesOutput { pending: Ref loading: Ref diff --git a/packages/axues/package.json b/packages/axues/package.json index 2c0ee62..878fe0e 100644 --- a/packages/axues/package.json +++ b/packages/axues/package.json @@ -1,6 +1,6 @@ { "name": "axues", - "version": "0.6.0", + "version": "0.6.1", "description": "Vue composable powered by axios for easier request state management, axios + vue = axues ✌️", "keywords": [ "axios",