Skip to content

Commit a53a1ec

Browse files
committed
docs(api): added api extractor to docs
1 parent 95ed629 commit a53a1ec

File tree

6 files changed

+747
-5
lines changed

6 files changed

+747
-5
lines changed

api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"apiReport": {
66
"enabled": true,
7-
"reportFolder": "<projectFolder>/temp/"
7+
"reportFolder": "<projectFolder>/docs/api/"
88
},
99

1010
"docModel": {

docs/.vuepress/config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ module.exports = {
148148
editLinks: true,
149149
sidebarDepth: 2,
150150
sidebar: {
151-
// "/composable": [
152-
// "",
153-
// ['guide/web/fetch', "fetch"]
154-
// ],
155151
"/examples/": [],
156152
"/": [
157153
"",

docs/api/axios.api.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## API Report File for "@vue-composable/axios"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { AxiosInstance } from 'axios';
8+
import { AxiosRequestConfig } from 'axios';
9+
import { AxiosResponse } from 'axios';
10+
import { PromiseResultFactory } from '@vue-composable/core';
11+
import { Ref } from '@vue/composition-api';
12+
13+
// Warning: (ae-forgotten-export) The symbol "AxiosReturn" needs to be exported by the entry point index.d.ts
14+
//
15+
// @public (undocumented)
16+
export function useAxios<TData = any>(throwException?: boolean): AxiosReturn<TData>;
17+
18+
// @public (undocumented)
19+
export function useAxios<TData = any>(url: string, config?: AxiosRequestConfig, throwException?: boolean): AxiosReturn<TData>;
20+
21+
// @public (undocumented)
22+
export function useAxios<TData = any>(url: string, throwException?: boolean): AxiosReturn<TData>;
23+
24+
// @public (undocumented)
25+
export function useAxios<TData = any>(config?: AxiosRequestConfig, throwException?: boolean): AxiosReturn<TData>;
26+
27+
28+
// (No @packageDocumentation comment for this package)
29+
30+
```

docs/api/core.api.md

Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
## API Report File for "@vue-composable/core"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { Ref } from '@vue/composition-api';
8+
9+
// @public (undocumented)
10+
export interface ArrayPaginationResult<T extends Array<any>> extends PaginationResult {
11+
// (undocumented)
12+
result: Readonly<Ref<T>>;
13+
}
14+
15+
// @public (undocumented)
16+
export interface CancellablePromiseResult<TCancel = any> {
17+
// (undocumented)
18+
cancel: (result?: TCancel) => void;
19+
// (undocumented)
20+
cancelled: Ref<boolean>;
21+
}
22+
23+
// @public (undocumented)
24+
export function debounce<F extends Procedure>(func: F, waitMilliseconds?: number, options?: Options): F;
25+
26+
// Warning: (ae-forgotten-export) The symbol "RetryDelayFactory" needs to be exported by the entry point index.d.ts
27+
//
28+
// @public (undocumented)
29+
export const exponentialDelay: RetryDelayFactory;
30+
31+
// @public (undocumented)
32+
export const FALSE_OP: () => boolean;
33+
34+
// @public (undocumented)
35+
export const isArray: (arg: any) => arg is any[];
36+
37+
// @public (undocumented)
38+
export const isBoolean: (val: unknown) => val is Boolean;
39+
40+
// @public (undocumented)
41+
export const isClient: boolean;
42+
43+
// @public (undocumented)
44+
export const isDate: (val: unknown) => val is Date;
45+
46+
// @public (undocumented)
47+
export const isElement: (val: unknown) => val is Element;
48+
49+
// @public (undocumented)
50+
export const isFunction: (val: unknown) => val is Function;
51+
52+
// @public (undocumented)
53+
export const isNumber: (val: unknown) => val is number;
54+
55+
// @public (undocumented)
56+
export const isObject: (val: unknown) => val is Record<any, any>;
57+
58+
// @public (undocumented)
59+
export function isPromise<T = any>(val: unknown): val is Promise<T>;
60+
61+
// @public (undocumented)
62+
export const isString: (val: unknown) => val is string;
63+
64+
// @public (undocumented)
65+
export const isSymbol: (val: unknown) => val is symbol;
66+
67+
// @public (undocumented)
68+
export function minMax(val: number, min: number, max: number): number;
69+
70+
// @public (undocumented)
71+
export const NO_OP: () => void;
72+
73+
// @public (undocumented)
74+
export const noDelay: RetryDelayFactory;
75+
76+
// @public (undocumented)
77+
export interface NowOptions {
78+
refreshMs?: number;
79+
sync?: boolean;
80+
}
81+
82+
// @public (undocumented)
83+
export type Options = {
84+
isImmediate: boolean;
85+
};
86+
87+
// @public (undocumented)
88+
export interface PaginationOptions {
89+
// (undocumented)
90+
currentPage: RefTyped<number>;
91+
// (undocumented)
92+
pageSize: RefTyped<number>;
93+
// (undocumented)
94+
total: RefTyped<number>;
95+
}
96+
97+
// @public (undocumented)
98+
export interface PaginationResult {
99+
// (undocumented)
100+
currentPage: Ref<number>;
101+
// (undocumented)
102+
first: PaginationControl;
103+
// (undocumented)
104+
last: PaginationControl;
105+
// (undocumented)
106+
lastPage: Readonly<Ref<number>>;
107+
// Warning: (ae-forgotten-export) The symbol "PaginationControl" needs to be exported by the entry point index.d.ts
108+
//
109+
// (undocumented)
110+
next: PaginationControl;
111+
// (undocumented)
112+
offset: Ref<number>;
113+
// (undocumented)
114+
pageSize: Ref<number>;
115+
// (undocumented)
116+
prev: PaginationControl;
117+
// (undocumented)
118+
total: Ref<number>;
119+
}
120+
121+
// @public (undocumented)
122+
export const PASSIVE_EV: AddEventListenerOptions;
123+
124+
// @public
125+
export type Procedure = (...args: any[]) => void;
126+
127+
// @public (undocumented)
128+
export function promisedTimeout(timeout: number): Promise<void>;
129+
130+
// Warning: (ae-forgotten-export) The symbol "PromiseResult" needs to be exported by the entry point index.d.ts
131+
//
132+
// @public (undocumented)
133+
export interface PromiseResultFactory<T extends Promise<any>, TArgs extends Array<any> = Array<any>> extends PromiseResult<T> {
134+
// Warning: (ae-forgotten-export) The symbol "PromiseType" needs to be exported by the entry point index.d.ts
135+
//
136+
// (undocumented)
137+
exec: (...args: TArgs) => Promise<PromiseType<T> | undefined>;
138+
}
139+
140+
// @public (undocumented)
141+
export type RefElement = Element | Ref<Element | undefined>;
142+
143+
// @public (undocumented)
144+
export type RefTyped<T> = T | Ref<T>;
145+
146+
// Warning: (ae-forgotten-export) The symbol "RetryReturn" needs to be exported by the entry point index.d.ts
147+
//
148+
// @public (undocumented)
149+
export interface RetryReturnFactory<T, TArgs extends Array<any>> extends RetryReturn {
150+
exec(...args: TArgs): T;
151+
}
152+
153+
// @public (undocumented)
154+
export interface RetryReturnNoFactory extends RetryReturn {
155+
exec<T>(fn: () => T): T;
156+
}
157+
158+
// @public (undocumented)
159+
export function unwrap(o: RefElement): Element;
160+
161+
// @public (undocumented)
162+
export function unwrap<T>(o: RefTyped<T>): T;
163+
164+
// @public (undocumented)
165+
export function useArrayPagination<T extends Array<TR>, TR>(array: RefTyped<T>, options?: Partial<Omit<PaginationOptions, 'total'>>): ArrayPaginationResult<T>;
166+
167+
// @public (undocumented)
168+
export function useCancellablePromise<T extends any, TArgs extends Array<any>>(fn: (...args: TArgs) => Promise<T>): PromiseResultFactory<Promise<T>, TArgs> & CancellablePromiseResult;
169+
170+
// @public (undocumented)
171+
export function useCancellablePromise<T extends any, TArgs extends Array<any>>(fn: (...args: TArgs) => Promise<T>, throwException: boolean): PromiseResultFactory<Promise<T>, TArgs> & CancellablePromiseResult;
172+
173+
// @public (undocumented)
174+
export function useCancellablePromise<T extends any>(fn: () => T): PromiseResultFactory<Promise<T>> & CancellablePromiseResult;
175+
176+
// @public (undocumented)
177+
export function useCancellablePromise<T extends any>(fn: () => T, throwException: boolean): PromiseResultFactory<Promise<T>> & CancellablePromiseResult;
178+
179+
// @public (undocumented)
180+
export function useCancellablePromise<T extends Promise<TR>, TR, TArgs extends Array<any>>(fn: (...args: TArgs) => T): PromiseResultFactory<T, TArgs> & CancellablePromiseResult;
181+
182+
// @public (undocumented)
183+
export function useCancellablePromise<T extends Promise<TR>, TR, TArgs extends Array<any>>(fn: (...args: TArgs) => T, throwException: boolean): PromiseResultFactory<T, TArgs> & CancellablePromiseResult;
184+
185+
// @public (undocumented)
186+
export function useCancellablePromise<T = any>(fn: () => T): PromiseResultFactory<Promise<T>> & CancellablePromiseResult;
187+
188+
// @public (undocumented)
189+
export function useCancellablePromise<T = any>(fn: () => T, throwException: boolean): PromiseResultFactory<Promise<T>> & CancellablePromiseResult;
190+
191+
// @public (undocumented)
192+
export function useCancellablePromise<T extends Promise<TR>, TR>(fn: () => T): PromiseResultFactory<T> & CancellablePromiseResult;
193+
194+
// @public (undocumented)
195+
export function useDateNow(options?: NowOptions): {
196+
now: import("@vue/composition-api").Ref<number>;
197+
remove: () => void;
198+
};
199+
200+
// @public (undocumented)
201+
export function useDebounce<T extends Function>(handler: T, wait?: number, options?: Options): T;
202+
203+
// @public (undocumented)
204+
export function useNow(options?: NowOptions & UseNowOptions): {
205+
now: import("@vue/composition-api").Ref<number>;
206+
remove: () => void;
207+
};
208+
209+
// @public (undocumented)
210+
export interface UseNowOptions {
211+
timeFn?: () => number;
212+
}
213+
214+
// @public (undocumented)
215+
export function usePagination(options: PaginationOptions): PaginationResult;
216+
217+
// @public (undocumented)
218+
export function usePerformanceNow(options?: NowOptions): {
219+
now: import("@vue/composition-api").Ref<number>;
220+
remove: () => void;
221+
};
222+
223+
// @public (undocumented)
224+
export function usePromise<T = any, TArgs extends Array<any> = Array<any>>(fn: (...args: TArgs) => Promise<T>, throwException?: boolean): PromiseResultFactory<Promise<T>, TArgs>;
225+
226+
// @public (undocumented)
227+
export function usePromise<T = any, TArgs extends Array<any> = Array<any>>(fn: (...args: TArgs) => Promise<T>): PromiseResultFactory<Promise<T>, TArgs>;
228+
229+
// @public (undocumented)
230+
export function usePromise<T = any, TArgs extends Array<any> = Array<any>>(fn: (...args: TArgs) => T, throwException: boolean): PromiseResultFactory<Promise<T>, TArgs>;
231+
232+
// @public (undocumented)
233+
export function usePromise<T = any, TArgs extends Array<any> = Array<any>>(fn: (...args: TArgs) => T): PromiseResultFactory<Promise<T>, TArgs>;
234+
235+
// @public (undocumented)
236+
export function usePromise<T = any>(fn: () => Promise<T>, throwException: boolean): PromiseResultFactory<Promise<T>>;
237+
238+
// @public (undocumented)
239+
export function usePromise<T = any>(fn: () => Promise<T>): PromiseResultFactory<Promise<T>>;
240+
241+
// @public (undocumented)
242+
export function usePromise<T = any>(fn: () => T, throwException: boolean): PromiseResultFactory<Promise<T>>;
243+
244+
// @public (undocumented)
245+
export function usePromise<T = any>(fn: () => T): PromiseResultFactory<Promise<T>>;
246+
247+
// Warning: (ae-forgotten-export) The symbol "RetryOptions" needs to be exported by the entry point index.d.ts
248+
//
249+
// @public (undocumented)
250+
export function useRetry(options?: RetryOptions): RetryReturnNoFactory;
251+
252+
// Warning: (ae-forgotten-export) The symbol "Factory" needs to be exported by the entry point index.d.ts
253+
//
254+
// @public (undocumented)
255+
export function useRetry<T, TArgs extends Array<any>>(factory: Factory<T, TArgs>): RetryReturnFactory<T, TArgs>;
256+
257+
// @public (undocumented)
258+
export function useRetry<T, TArgs extends Array<any>>(options: RetryOptions, factory: Factory<T, TArgs>): RetryReturnFactory<T, TArgs>;
259+
260+
// @public (undocumented)
261+
export function wrap(o: RefElement): Ref<Element>;
262+
263+
// @public (undocumented)
264+
export function wrap<T>(o: RefTyped<T>): Ref<T>;
265+
266+
267+
// (No @packageDocumentation comment for this package)
268+
269+
```

docs/api/vue-composable.api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## API Report File for "vue-composable"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
8+
export * from "@vue-composable/core";
9+
export * from "@vue-composable/web";
10+
11+
// (No @packageDocumentation comment for this package)
12+
13+
```

0 commit comments

Comments
 (0)