@reactive-vscode/vueuse 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1059 -1578
- package/dist/index.d.ts +264 -300
- package/dist/index.js +1105 -1632
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import { ComponentInternalInstance } from '@reactive-vscode/reactivity';
|
|
1
2
|
import { ComputedGetter } from '@reactive-vscode/reactivity';
|
|
2
3
|
import { ComputedRef } from '@reactive-vscode/reactivity';
|
|
3
4
|
import { MaybeRef } from '@reactive-vscode/reactivity';
|
|
4
5
|
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
5
6
|
import { Ref } from '@reactive-vscode/reactivity';
|
|
7
|
+
import { toRef as resolveRef } from '@reactive-vscode/reactivity';
|
|
6
8
|
import { ShallowRef } from '@reactive-vscode/reactivity';
|
|
7
9
|
import { ShallowUnwrapRef as ShallowUnwrapRef_2 } from '@reactive-vscode/reactivity';
|
|
8
10
|
import { ToRef } from '@reactive-vscode/reactivity';
|
|
9
11
|
import { ToRefs } from '@reactive-vscode/reactivity';
|
|
10
|
-
import { toValue
|
|
12
|
+
import { toValue } from '@reactive-vscode/reactivity';
|
|
11
13
|
import { UnwrapNestedRefs } from '@reactive-vscode/reactivity';
|
|
12
14
|
import { UnwrapRef } from '@reactive-vscode/reactivity';
|
|
13
|
-
import * as
|
|
15
|
+
import * as vue0 from '@reactive-vscode/reactivity';
|
|
14
16
|
import { WatchCallback } from '@reactive-vscode/reactivity';
|
|
17
|
+
import { WatchHandle } from '@reactive-vscode/reactivity';
|
|
15
18
|
import { WatchOptions } from '@reactive-vscode/reactivity';
|
|
16
19
|
import { WatchSource } from '@reactive-vscode/reactivity';
|
|
17
20
|
import { WatchStopHandle } from '@reactive-vscode/reactivity';
|
|
@@ -30,9 +33,9 @@ export declare interface AfterFetchContext<T = any> {
|
|
|
30
33
|
*/
|
|
31
34
|
export declare type AnyFn = (...args: any[]) => any;
|
|
32
35
|
|
|
33
|
-
export declare type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never;
|
|
36
|
+
export declare type ArgumentsType<T$1> = T$1 extends ((...args: infer U) => any) ? U : never;
|
|
34
37
|
|
|
35
|
-
export declare type Arrayable<T> = T[] | T;
|
|
38
|
+
export declare type Arrayable<T$1> = T$1[] | T$1;
|
|
36
39
|
|
|
37
40
|
export declare const assert: (condition: boolean, ...infos: any[]) => void;
|
|
38
41
|
|
|
@@ -66,23 +69,23 @@ export declare interface AsyncComputedOptions<Lazy = boolean> {
|
|
|
66
69
|
* Possible values: `pre`, `post`, `sync`
|
|
67
70
|
*
|
|
68
71
|
* It works in the same way as the flush option in watch and watch effect in vue reactivity
|
|
69
|
-
* @default '
|
|
72
|
+
* @default 'sync'
|
|
70
73
|
*/
|
|
71
|
-
flush?:
|
|
74
|
+
flush?: WatchOptionFlush;
|
|
72
75
|
/**
|
|
73
76
|
* Callback when error is caught.
|
|
74
77
|
*/
|
|
75
78
|
onError?: (e: unknown) => void;
|
|
76
79
|
}
|
|
77
80
|
|
|
78
|
-
export declare type Awaitable<T> = Promise<T> | T;
|
|
81
|
+
export declare type Awaitable<T$1> = Promise<T$1> | T$1;
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
84
|
* Compatible with versions below TypeScript 4.5 Awaited
|
|
82
85
|
*/
|
|
83
|
-
declare type Awaited_2<T> = T extends null | undefined ? T : T extends object & {
|
|
86
|
+
declare type Awaited_2<T$1> = T$1 extends null | undefined ? T$1 : T$1 extends object & {
|
|
84
87
|
then: (onfulfilled: infer F, ...args: infer _) => any;
|
|
85
|
-
} ? F extends ((value: infer V, ...args: infer _) => any) ? Awaited_2<V> : never : T;
|
|
88
|
+
} ? F extends ((value: infer V, ...args: infer _) => any) ? Awaited_2<V> : never : T$1;
|
|
86
89
|
export { Awaited_2 as Awaited }
|
|
87
90
|
|
|
88
91
|
export declare interface BeforeFetchContext {
|
|
@@ -117,14 +120,7 @@ declare interface BrowserLocationState {
|
|
|
117
120
|
|
|
118
121
|
export declare const bypassFilter: EventFilter;
|
|
119
122
|
|
|
120
|
-
|
|
121
|
-
* The source code for this function was inspired by vue-apollo's `useEventHook` util
|
|
122
|
-
* https://github.com/vuejs/vue-apollo/blob/v4/packages/vue-apollo-composable/src/util/useEventHook.ts
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
declare type Callback<T> = IsAny<T> extends true ? (...param: any) => void : ([
|
|
126
|
-
T
|
|
127
|
-
] extends [void] ? (...param: unknown[]) => void : [T] extends [any[]] ? (...param: T) => void : (...param: [T, ...unknown[]]) => void);
|
|
123
|
+
declare type Callback<T$1> = IsAny<T$1> extends true ? (...param: any) => void : ([T$1] extends [void] ? (...param: unknown[]) => void : [T$1] extends [any[]] ? (...param: T$1) => void : (...param: [T$1, ...unknown[]]) => void);
|
|
128
124
|
|
|
129
125
|
export declare const camelize: (str: string) => string;
|
|
130
126
|
|
|
@@ -154,18 +150,17 @@ declare function computedAsync<T>(evaluationCallback: (onCancel: AsyncComputedOn
|
|
|
154
150
|
export { computedAsync as asyncComputed }
|
|
155
151
|
export { computedAsync }
|
|
156
152
|
|
|
157
|
-
declare type ComputedInjectGetter<T, K> = (source: T | undefined, oldValue?: K) => K;
|
|
153
|
+
declare type ComputedInjectGetter<T, K$1> = (source: T | undefined, oldValue?: K$1) => K$1;
|
|
158
154
|
|
|
159
|
-
declare type ComputedInjectGetterWithDefault<T, K> = (source: T, oldValue?: K) => K;
|
|
155
|
+
declare type ComputedInjectGetterWithDefault<T, K$1> = (source: T, oldValue?: K$1) => K$1;
|
|
160
156
|
|
|
161
157
|
declare type ComputedInjectSetter<T> = (v: T) => void;
|
|
162
158
|
|
|
163
|
-
export declare interface ComputedRefWithControl<T> extends ComputedRef<T>, ComputedWithControlRefExtra {
|
|
164
|
-
}
|
|
159
|
+
export declare interface ComputedRefWithControl<T$1> extends ComputedRef<T$1>, ComputedWithControlRefExtra {}
|
|
165
160
|
|
|
166
|
-
declare function computedWithControl<T, S>(source: WatchSource<S> | WatchSource<S>[], fn: ComputedGetter<T>, options?: WatchOptions): ComputedRefWithControl<T>;
|
|
161
|
+
declare function computedWithControl<T$1, S$1>(source: WatchSource<S$1> | WatchSource<S$1>[], fn: ComputedGetter<T$1>, options?: WatchOptions): ComputedRefWithControl<T$1>;
|
|
167
162
|
|
|
168
|
-
declare function computedWithControl<T, S>(source: WatchSource<S> | WatchSource<S>[], fn: WritableComputedOptions<T>, options?: WatchOptions): WritableComputedRefWithControl<T>;
|
|
163
|
+
declare function computedWithControl<T$1, S$1>(source: WatchSource<S$1> | WatchSource<S$1>[], fn: WritableComputedOptions<T$1>, options?: WatchOptions): WritableComputedRefWithControl<T$1>;
|
|
169
164
|
export { computedWithControl }
|
|
170
165
|
export { computedWithControl as controlledComputed }
|
|
171
166
|
|
|
@@ -200,7 +195,7 @@ export declare interface ConfigurableFlush {
|
|
|
200
195
|
*
|
|
201
196
|
* @default 'pre'
|
|
202
197
|
*/
|
|
203
|
-
flush?:
|
|
198
|
+
flush?: WatchOptionFlush;
|
|
204
199
|
}
|
|
205
200
|
|
|
206
201
|
export declare interface ConfigurableFlushSync {
|
|
@@ -210,7 +205,7 @@ export declare interface ConfigurableFlushSync {
|
|
|
210
205
|
*
|
|
211
206
|
* @default 'sync'
|
|
212
207
|
*/
|
|
213
|
-
flush?:
|
|
208
|
+
flush?: WatchOptionFlush;
|
|
214
209
|
}
|
|
215
210
|
|
|
216
211
|
declare interface ConfigurableNavigator {
|
|
@@ -223,24 +218,22 @@ declare interface ConfigurableWindow {
|
|
|
223
218
|
|
|
224
219
|
export declare function containsProp(obj: object, ...props: string[]): boolean;
|
|
225
220
|
|
|
226
|
-
/**
|
|
227
|
-
* Alias for `refWithControl`
|
|
228
|
-
*/
|
|
221
|
+
/** @deprecated use `refWithControl` instead */
|
|
229
222
|
export declare const controlledRef: typeof refWithControl;
|
|
230
223
|
|
|
231
|
-
export declare interface ControlledRefOptions<T> {
|
|
224
|
+
export declare interface ControlledRefOptions<T$1> {
|
|
232
225
|
/**
|
|
233
226
|
* Callback function before the ref changing.
|
|
234
227
|
*
|
|
235
228
|
* Returning `false` to dismiss the change.
|
|
236
229
|
*/
|
|
237
|
-
onBeforeChange?: (value: T, oldValue: T) => void | boolean;
|
|
230
|
+
onBeforeChange?: (value: T$1, oldValue: T$1) => void | boolean;
|
|
238
231
|
/**
|
|
239
232
|
* Callback function after the ref changed
|
|
240
233
|
*
|
|
241
234
|
* This happens synchronously, with less overhead compare to `watch`
|
|
242
235
|
*/
|
|
243
|
-
onChanged?: (value: T, oldValue: T) => void;
|
|
236
|
+
onChanged?: (value: T$1, oldValue: T$1) => void;
|
|
244
237
|
}
|
|
245
238
|
|
|
246
239
|
/**
|
|
@@ -250,7 +243,7 @@ export declare interface ControlledRefOptions<T> {
|
|
|
250
243
|
*
|
|
251
244
|
* @__NO_SIDE_EFFECTS__
|
|
252
245
|
*/
|
|
253
|
-
export declare function createEventHook<T = any>(): EventHookReturn<T>;
|
|
246
|
+
export declare function createEventHook<T$1 = any>(): EventHookReturn<T$1>;
|
|
254
247
|
|
|
255
248
|
export declare function createFetch(config?: CreateFetchOptions): typeof useFetch;
|
|
256
249
|
|
|
@@ -284,9 +277,9 @@ export declare interface CreateFetchOptions {
|
|
|
284
277
|
*
|
|
285
278
|
* @__NO_SIDE_EFFECTS__
|
|
286
279
|
*/
|
|
287
|
-
export declare function createGlobalState<Fn extends AnyFn>(stateFactory: Fn): CreateGlobalStateReturn<Fn>;
|
|
280
|
+
export declare function createGlobalState<Fn$1 extends AnyFn>(stateFactory: Fn$1): CreateGlobalStateReturn<Fn$1>;
|
|
288
281
|
|
|
289
|
-
declare type CreateGlobalStateReturn<Fn extends AnyFn = AnyFn> = Fn;
|
|
282
|
+
declare type CreateGlobalStateReturn<Fn$1 extends AnyFn = AnyFn> = Fn$1;
|
|
290
283
|
|
|
291
284
|
/**
|
|
292
285
|
* Make a composable function usable with multiple Vue instances.
|
|
@@ -295,7 +288,7 @@ declare type CreateGlobalStateReturn<Fn extends AnyFn = AnyFn> = Fn;
|
|
|
295
288
|
*
|
|
296
289
|
* @__NO_SIDE_EFFECTS__
|
|
297
290
|
*/
|
|
298
|
-
export declare function createSharedComposable<Fn extends AnyFn>(composable: Fn): SharedComposableReturn<Fn>;
|
|
291
|
+
export declare function createSharedComposable<Fn$1 extends AnyFn>(composable: Fn$1): SharedComposableReturn<Fn$1>;
|
|
299
292
|
|
|
300
293
|
/**
|
|
301
294
|
* Create singleton promise function
|
|
@@ -309,7 +302,7 @@ export declare function createSharedComposable<Fn extends AnyFn>(composable: Fn)
|
|
|
309
302
|
* await promise() // and be resolved together
|
|
310
303
|
* ```
|
|
311
304
|
*/
|
|
312
|
-
export declare function createSingletonPromise<T>(fn: () => Promise<T>): SingletonPromiseReturn<T>;
|
|
305
|
+
export declare function createSingletonPromise<T$1>(fn: () => Promise<T$1>): SingletonPromiseReturn<T$1>;
|
|
313
306
|
|
|
314
307
|
/**
|
|
315
308
|
* Make a plain function accepting ref and raw values as arguments.
|
|
@@ -349,63 +342,60 @@ export declare interface DebounceFilterOptions {
|
|
|
349
342
|
* UnwrapRef<DeepMaybeRef<T>> === T
|
|
350
343
|
* ```
|
|
351
344
|
*/
|
|
352
|
-
export declare type DeepMaybeRef<T> = T extends Ref<infer V> ? MaybeRef<V> : T extends Array<any> | object ? {
|
|
353
|
-
[K in keyof T]: DeepMaybeRef<T[K]>;
|
|
354
|
-
} : MaybeRef<T>;
|
|
345
|
+
export declare type DeepMaybeRef<T$1> = T$1 extends Ref<infer V> ? MaybeRef<V> : T$1 extends Array<any> | object ? { [K in keyof T$1]: DeepMaybeRef<T$1[K]> } : MaybeRef<T$1>;
|
|
355
346
|
|
|
356
347
|
declare type Direction = 'ltr' | 'rtl' | 'both';
|
|
357
348
|
|
|
358
349
|
/**
|
|
359
350
|
* Infers the element type of an array
|
|
360
351
|
*/
|
|
361
|
-
export declare type ElementOf<T> = T extends (infer E)[] ? E : never;
|
|
352
|
+
export declare type ElementOf<T$1> = T$1 extends (infer E)[] ? E : never;
|
|
362
353
|
|
|
363
354
|
/**
|
|
364
355
|
* A = B
|
|
365
356
|
*/
|
|
366
|
-
declare type Equal<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;
|
|
357
|
+
declare type Equal<A$1, B> = [A$1] extends [B] ? ([B] extends [A$1] ? true : false) : false;
|
|
367
358
|
|
|
368
|
-
declare interface EqualType<D extends Direction, L, R, O extends keyof Transform<L, R> = D extends 'both' ? 'ltr' | 'rtl' : D> {
|
|
369
|
-
transform?: SpecificFieldPartial<Pick<Transform<L, R>, O>, O>;
|
|
359
|
+
declare interface EqualType<D extends Direction, L, R$1, O extends keyof Transform<L, R$1> = (D extends 'both' ? 'ltr' | 'rtl' : D)> {
|
|
360
|
+
transform?: SpecificFieldPartial<Pick<Transform<L, R$1>, O>, O>;
|
|
370
361
|
}
|
|
371
362
|
|
|
372
|
-
export declare type EventBusEvents<T, P = any> = Set<EventBusListener<T, P>>;
|
|
363
|
+
export declare type EventBusEvents<T, P$1 = any> = Set<EventBusListener<T, P$1>>;
|
|
373
364
|
|
|
374
365
|
export declare type EventBusIdentifier<T = unknown> = EventBusKey<T> | string | number;
|
|
375
366
|
|
|
376
|
-
export declare interface EventBusKey<T> extends Symbol {
|
|
377
|
-
}
|
|
367
|
+
export declare interface EventBusKey<T> extends Symbol {}
|
|
378
368
|
|
|
379
|
-
export declare type EventBusListener<T = unknown, P = any> = (event: T, payload?: P) => void;
|
|
369
|
+
export declare type EventBusListener<T = unknown, P$1 = any> = (event: T, payload?: P$1) => void;
|
|
380
370
|
|
|
381
371
|
export declare type EventFilter<Args extends any[] = any[], This = any, Invoke extends AnyFn = AnyFn> = (invoke: Invoke, options: FunctionWrapperOptions<Args, This>) => ReturnType<Invoke> | Promisify<ReturnType<Invoke>>;
|
|
382
372
|
|
|
383
|
-
export declare interface EventHook<T = any> {
|
|
384
|
-
on: EventHookOn<T>;
|
|
385
|
-
off: EventHookOff<T>;
|
|
386
|
-
trigger: EventHookTrigger<T>;
|
|
373
|
+
export declare interface EventHook<T$1 = any> {
|
|
374
|
+
on: EventHookOn<T$1>;
|
|
375
|
+
off: EventHookOff<T$1>;
|
|
376
|
+
trigger: EventHookTrigger<T$1>;
|
|
387
377
|
clear: () => void;
|
|
388
378
|
}
|
|
389
379
|
|
|
390
|
-
export declare type EventHookOff<T = any> = (fn: Callback<T>) => void;
|
|
380
|
+
export declare type EventHookOff<T$1 = any> = (fn: Callback<T$1>) => void;
|
|
391
381
|
|
|
392
|
-
export declare type EventHookOn<T = any> = (fn: Callback<T>) => {
|
|
382
|
+
export declare type EventHookOn<T$1 = any> = (fn: Callback<T$1>) => {
|
|
393
383
|
off: () => void;
|
|
394
384
|
};
|
|
395
385
|
|
|
396
|
-
declare type EventHookReturn<T> = EventHook<T>;
|
|
386
|
+
declare type EventHookReturn<T$1> = EventHook<T$1>;
|
|
397
387
|
|
|
398
|
-
export declare type EventHookTrigger<T = any> = (...param: Parameters<Callback<T>>) => Promise<unknown[]>;
|
|
388
|
+
export declare type EventHookTrigger<T$1 = any> = (...param: Parameters<Callback<T$1>>) => Promise<unknown[]>;
|
|
399
389
|
|
|
400
390
|
/**
|
|
401
391
|
* Overload 1: Unwrap set to false
|
|
402
392
|
*/
|
|
403
|
-
export declare function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions<false>>(ref: R, extend: Extend, options?: Options): ShallowUnwrapRef_2<Extend> & R;
|
|
393
|
+
export declare function extendRef<R$1 extends Ref<any>, Extend extends object, Options extends ExtendRefOptions<false>>(ref: R$1, extend: Extend, options?: Options): ShallowUnwrapRef_2<Extend> & R$1;
|
|
404
394
|
|
|
405
395
|
/**
|
|
406
396
|
* Overload 2: Unwrap unset or set to true
|
|
407
397
|
*/
|
|
408
|
-
export declare function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions>(ref: R, extend: Extend, options?: Options): Extend & R;
|
|
398
|
+
export declare function extendRef<R$1 extends Ref<any>, Extend extends object, Options extends ExtendRefOptions>(ref: R$1, extend: Extend, options?: Options): Extend & R$1;
|
|
409
399
|
|
|
410
400
|
export declare interface ExtendRefOptions<Unwrap extends boolean = boolean> {
|
|
411
401
|
/**
|
|
@@ -481,19 +471,19 @@ export declare interface GeneralEventListener<E = Event> {
|
|
|
481
471
|
/**
|
|
482
472
|
* Shorthand for accessing `ref.value`
|
|
483
473
|
*/
|
|
484
|
-
export declare function get<T>(ref: MaybeRef<T>): T;
|
|
474
|
+
export declare function get<T$1>(ref: MaybeRef<T$1>): T$1;
|
|
485
475
|
|
|
486
|
-
export declare function get<T, K extends keyof T>(ref: MaybeRef<T>, key: K): T[K];
|
|
476
|
+
export declare function get<T$1, K$1 extends keyof T$1>(ref: MaybeRef<T$1>, key: K$1): T$1[K$1];
|
|
487
477
|
|
|
488
|
-
export declare function getLifeCycleTarget(target?:
|
|
478
|
+
export declare function getLifeCycleTarget(target?: ComponentInternalInstance | null): ComponentInternalInstance | null;
|
|
489
479
|
|
|
490
480
|
export declare const hasOwn: <T extends object, K extends keyof T>(val: T, key: K) => key is K;
|
|
491
481
|
|
|
492
482
|
export declare const hyphenate: (str: string) => string;
|
|
493
483
|
|
|
494
|
-
export declare function identity<T>(arg: T): T;
|
|
484
|
+
export declare function identity<T$1>(arg: T$1): T$1;
|
|
495
485
|
|
|
496
|
-
export declare type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
|
|
486
|
+
export declare type IfAny<T$1, Y, N> = 0 extends (1 & T$1) ? Y : N;
|
|
497
487
|
|
|
498
488
|
declare type IgnoredPrevAsyncUpdates = () => void;
|
|
499
489
|
|
|
@@ -502,7 +492,7 @@ export declare type IgnoredUpdater = (updater: () => void) => void;
|
|
|
502
492
|
/**
|
|
503
493
|
* A ⊆ B
|
|
504
494
|
*/
|
|
505
|
-
declare type IncludeButNotEqual<A, B> = Equal<A, B> extends true ? false : A extends B ? true : false;
|
|
495
|
+
declare type IncludeButNotEqual<A$1, B> = Equal<A$1, B> extends true ? false : A$1 extends B ? true : false;
|
|
506
496
|
|
|
507
497
|
/**
|
|
508
498
|
* Increase string a value with unit
|
|
@@ -519,50 +509,42 @@ export declare function increaseWithUnit(target: string | number, delta: number)
|
|
|
519
509
|
/**
|
|
520
510
|
* A ∩ B ≠ ∅
|
|
521
511
|
*/
|
|
522
|
-
declare type IntersectButNotEqual<A, B> = Equal<A, B> extends true ? false : A & B extends never ? false : true;
|
|
512
|
+
declare type IntersectButNotEqual<A$1, B> = Equal<A$1, B> extends true ? false : A$1 & B extends never ? false : true;
|
|
523
513
|
|
|
524
|
-
declare type IntersectButNotEqualType<D extends Direction, L, R> = D extends 'both' ? {
|
|
525
|
-
transform: Transform<L, R>;
|
|
514
|
+
declare type IntersectButNotEqualType<D extends Direction, L, R$1> = D extends 'both' ? {
|
|
515
|
+
transform: Transform<L, R$1>;
|
|
526
516
|
} : D extends Exclude<Direction, 'both'> ? {
|
|
527
|
-
transform: Pick<Transform<L, R>, D>;
|
|
517
|
+
transform: Pick<Transform<L, R$1>, D>;
|
|
528
518
|
} : never;
|
|
529
519
|
|
|
530
|
-
export declare function invoke<T>(fn: () => T): T;
|
|
520
|
+
export declare function invoke<T$1>(fn: () => T$1): T$1;
|
|
531
521
|
|
|
532
522
|
/**
|
|
533
523
|
* will return `true` if `T` is `any`, or `false` otherwise
|
|
534
524
|
*/
|
|
535
|
-
export declare type IsAny<T> = IfAny<T, true, false>;
|
|
525
|
+
export declare type IsAny<T$1> = IfAny<T$1, true, false>;
|
|
536
526
|
|
|
537
527
|
export declare const isDef: <T = any>(val?: T) => val is T;
|
|
538
528
|
|
|
539
|
-
export declare function isDefined<T>(v: ComputedRef<T>): v is ComputedRef<Exclude<T, null | undefined>>;
|
|
529
|
+
export declare function isDefined<T$1>(v: ComputedRef<T$1>): v is ComputedRef<Exclude<T$1, null | undefined>>;
|
|
540
530
|
|
|
541
|
-
export declare function isDefined<T>(v: Ref<T>): v is Ref<Exclude<T, null | undefined>>;
|
|
531
|
+
export declare function isDefined<T$1>(v: Ref<T$1>): v is Ref<Exclude<T$1, null | undefined>>;
|
|
542
532
|
|
|
543
|
-
export declare function isDefined<T>(v: T): v is Exclude<T, null | undefined>;
|
|
533
|
+
export declare function isDefined<T$1>(v: T$1): v is Exclude<T$1, null | undefined>;
|
|
544
534
|
|
|
545
535
|
export declare const isObject: (val: any) => val is object;
|
|
546
536
|
|
|
547
|
-
export declare function makeDestructurable<T extends Record<string, unknown>, A extends readonly any[]>(obj: T, arr: A): T & A;
|
|
537
|
+
export declare function makeDestructurable<T$1 extends Record<string, unknown>, A$1 extends readonly any[]>(obj: T$1, arr: A$1): T$1 & A$1;
|
|
548
538
|
|
|
549
|
-
export declare type MapOldSources<T, Immediate> = {
|
|
550
|
-
[K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : never;
|
|
551
|
-
};
|
|
539
|
+
export declare type MapOldSources<T$1, Immediate> = { [K in keyof T$1]: T$1[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : never };
|
|
552
540
|
|
|
553
|
-
declare type MapQueueTask<T extends any[]> = {
|
|
554
|
-
[K in keyof T]: UseAsyncQueueTask<T[K]>;
|
|
555
|
-
};
|
|
541
|
+
declare type MapQueueTask<T extends any[]> = { [K in keyof T]: UseAsyncQueueTask<T[K]> };
|
|
556
542
|
|
|
557
|
-
export declare type MapSources<T> = {
|
|
558
|
-
[K in keyof T]: T[K] extends WatchSource<infer V> ? V : never;
|
|
559
|
-
};
|
|
543
|
+
export declare type MapSources<T$1> = { [K in keyof T$1]: T$1[K] extends WatchSource<infer V> ? V : never };
|
|
560
544
|
|
|
561
545
|
export declare type MultiWatchSources = (WatchSource<unknown> | object)[];
|
|
562
546
|
|
|
563
|
-
export declare type Mutable<T> = {
|
|
564
|
-
-readonly [P in keyof T]: T[P];
|
|
565
|
-
};
|
|
547
|
+
export declare type Mutable<T$1> = { -readonly [P in keyof T$1]: T$1[P] };
|
|
566
548
|
|
|
567
549
|
export declare const noop: () => void;
|
|
568
550
|
|
|
@@ -571,25 +553,25 @@ export declare function normalizeDate(date: DateLike): Date;
|
|
|
571
553
|
/**
|
|
572
554
|
* A ∩ B = ∅
|
|
573
555
|
*/
|
|
574
|
-
declare type NotIntersect<A, B> = Equal<A, B> extends true ? false : A & B extends never ? true : false;
|
|
556
|
+
declare type NotIntersect<A$1, B> = Equal<A$1, B> extends true ? false : A$1 & B extends never ? true : false;
|
|
575
557
|
|
|
576
|
-
declare type NotIntersectType<D extends Direction, L, R> = IntersectButNotEqualType<D, L, R>;
|
|
558
|
+
declare type NotIntersectType<D extends Direction, L, R$1> = IntersectButNotEqualType<D, L, R$1>;
|
|
577
559
|
|
|
578
560
|
export declare const notNullish: <T = any>(val?: T | null | undefined) => val is T;
|
|
579
561
|
|
|
580
562
|
export declare const now: () => number;
|
|
581
563
|
|
|
582
|
-
export declare function objectEntries<T extends object>(obj: T): Array<[keyof T, T[keyof T]]>;
|
|
564
|
+
export declare function objectEntries<T$1 extends object>(obj: T$1): Array<[keyof T$1, T$1[keyof T$1]]>;
|
|
583
565
|
|
|
584
566
|
/**
|
|
585
567
|
* Create a new subset object by omit giving keys
|
|
586
568
|
*/
|
|
587
|
-
export declare function objectOmit<O extends object, T extends keyof O>(obj: O, keys: T[], omitUndefined?: boolean): Omit<O, T>;
|
|
569
|
+
export declare function objectOmit<O extends object, T$1 extends keyof O>(obj: O, keys: T$1[], omitUndefined?: boolean): Omit<O, T$1>;
|
|
588
570
|
|
|
589
571
|
/**
|
|
590
572
|
* Create a new subset object by giving keys
|
|
591
573
|
*/
|
|
592
|
-
export declare function objectPick<O extends object, T extends keyof O>(obj: O, keys: T[], omitUndefined?: boolean): Pick<O, T>;
|
|
574
|
+
export declare function objectPick<O extends object, T$1 extends keyof O>(obj: O, keys: T$1[], omitUndefined?: boolean): Pick<O, T$1>;
|
|
593
575
|
|
|
594
576
|
declare type OnCleanup = (cleanupFn: () => void) => void;
|
|
595
577
|
|
|
@@ -639,15 +621,13 @@ declare type PostMessage = typeof Worker.prototype['postMessage'];
|
|
|
639
621
|
|
|
640
622
|
export declare function promiseTimeout(ms: number, throwOnTimeout?: boolean, reason?: string): Promise<void>;
|
|
641
623
|
|
|
642
|
-
export declare type Promisify<T> = Promise<Awaited_2<T>>;
|
|
624
|
+
export declare type Promisify<T$1> = Promise<Awaited_2<T$1>>;
|
|
643
625
|
|
|
644
|
-
export declare type PromisifyFn<T extends AnyFn> = (...args: ArgumentsType<T>) => Promisify<ReturnType<T>>;
|
|
626
|
+
export declare type PromisifyFn<T$1 extends AnyFn> = (...args: ArgumentsType<T$1>) => Promisify<ReturnType<T$1>>;
|
|
645
627
|
|
|
646
628
|
export declare const rand: (min: number, max: number) => number;
|
|
647
629
|
|
|
648
|
-
export declare type Reactified<T, Computed extends boolean> = T extends (...args: infer A) => infer R ? (...args: {
|
|
649
|
-
[K in keyof A]: Computed extends true ? MaybeRefOrGetter<A[K]> : MaybeRef<A[K]>;
|
|
650
|
-
}) => ComputedRef<R> : never;
|
|
630
|
+
export declare type Reactified<T$1, Computed extends boolean> = T$1 extends ((...args: infer A) => infer R) ? (...args: { [K in keyof A]: Computed extends true ? MaybeRefOrGetter<A[K]> : MaybeRef<A[K]> }) => ComputedRef<R> : never;
|
|
651
631
|
|
|
652
632
|
/**
|
|
653
633
|
* Converts plain function into a reactive function.
|
|
@@ -659,24 +639,22 @@ export declare type Reactified<T, Computed extends boolean> = T extends (...args
|
|
|
659
639
|
*
|
|
660
640
|
* @__NO_SIDE_EFFECTS__
|
|
661
641
|
*/
|
|
662
|
-
declare function reactify<T extends AnyFn, K extends boolean = true>(fn: T, options?: ReactifyOptions<K>): ReactifyReturn<T, K>;
|
|
642
|
+
declare function reactify<T$1 extends AnyFn, K$1 extends boolean = true>(fn: T$1, options?: ReactifyOptions<K$1>): ReactifyReturn<T$1, K$1>;
|
|
663
643
|
export { reactify as createReactiveFn }
|
|
664
644
|
export { reactify }
|
|
665
645
|
|
|
666
|
-
export declare type ReactifyNested<T, Keys extends keyof T = keyof T, S extends boolean = true> = {
|
|
667
|
-
[K in Keys]: T[K] extends AnyFn ? Reactified<T[K], S> : T[K];
|
|
668
|
-
};
|
|
646
|
+
export declare type ReactifyNested<T$1, Keys extends keyof T$1 = keyof T$1, S$1 extends boolean = true> = { [K in Keys]: T$1[K] extends AnyFn ? Reactified<T$1[K], S$1> : T$1[K] };
|
|
669
647
|
|
|
670
648
|
/**
|
|
671
649
|
* Apply `reactify` to an object
|
|
672
650
|
*
|
|
673
651
|
* @__NO_SIDE_EFFECTS__
|
|
674
652
|
*/
|
|
675
|
-
export declare function reactifyObject<T extends object, Keys extends keyof T>(obj: T, keys?: (keyof T)[]): ReactifyObjectReturn<T, Keys, true>;
|
|
653
|
+
export declare function reactifyObject<T$1 extends object, Keys extends keyof T$1>(obj: T$1, keys?: (keyof T$1)[]): ReactifyObjectReturn<T$1, Keys, true>;
|
|
676
654
|
|
|
677
|
-
export declare function reactifyObject<T extends object, S extends boolean = true>(obj: T, options?: ReactifyObjectOptions<S>): ReactifyObjectReturn<T, keyof T, S>;
|
|
655
|
+
export declare function reactifyObject<T$1 extends object, S$1 extends boolean = true>(obj: T$1, options?: ReactifyObjectOptions<S$1>): ReactifyObjectReturn<T$1, keyof T$1, S$1>;
|
|
678
656
|
|
|
679
|
-
export declare interface ReactifyObjectOptions<T extends boolean> extends ReactifyOptions<T> {
|
|
657
|
+
export declare interface ReactifyObjectOptions<T$1 extends boolean> extends ReactifyOptions<T$1> {
|
|
680
658
|
/**
|
|
681
659
|
* Includes names from Object.getOwnPropertyNames
|
|
682
660
|
*
|
|
@@ -685,48 +663,46 @@ export declare interface ReactifyObjectOptions<T extends boolean> extends Reacti
|
|
|
685
663
|
includeOwnProperties?: boolean;
|
|
686
664
|
}
|
|
687
665
|
|
|
688
|
-
declare type ReactifyObjectReturn<T, Keys extends keyof T, S extends boolean = true> = ReactifyNested<T, Keys, S>;
|
|
666
|
+
declare type ReactifyObjectReturn<T$1, Keys extends keyof T$1, S$1 extends boolean = true> = ReactifyNested<T$1, Keys, S$1>;
|
|
689
667
|
|
|
690
|
-
export declare interface ReactifyOptions<T extends boolean> {
|
|
668
|
+
export declare interface ReactifyOptions<T$1 extends boolean> {
|
|
691
669
|
/**
|
|
692
670
|
* Accept passing a function as a reactive getter
|
|
693
671
|
*
|
|
694
672
|
* @default true
|
|
695
673
|
*/
|
|
696
|
-
computedGetter?: T;
|
|
674
|
+
computedGetter?: T$1;
|
|
697
675
|
}
|
|
698
676
|
|
|
699
|
-
declare type ReactifyReturn<T extends AnyFn = AnyFn, K extends boolean = true> = Reactified<T, K>;
|
|
677
|
+
declare type ReactifyReturn<T$1 extends AnyFn = AnyFn, K$1 extends boolean = true> = Reactified<T$1, K$1>;
|
|
700
678
|
|
|
701
679
|
/**
|
|
702
680
|
* Computed reactive object.
|
|
703
681
|
*/
|
|
704
|
-
export declare function reactiveComputed<T extends object>(fn: ComputedGetter<T>): ReactiveComputedReturn<T>;
|
|
682
|
+
export declare function reactiveComputed<T$1 extends object>(fn: ComputedGetter<T$1>): ReactiveComputedReturn<T$1>;
|
|
705
683
|
|
|
706
|
-
declare type ReactiveComputedReturn<T extends object> = UnwrapNestedRefs<T>;
|
|
684
|
+
declare type ReactiveComputedReturn<T$1 extends object> = UnwrapNestedRefs<T$1>;
|
|
707
685
|
|
|
708
|
-
export declare function reactiveOmit<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): ReactiveOmitReturn<T, K>;
|
|
686
|
+
export declare function reactiveOmit<T$1 extends object, K$1 extends keyof T$1>(obj: T$1, ...keys: (K$1 | K$1[])[]): ReactiveOmitReturn<T$1, K$1>;
|
|
709
687
|
|
|
710
|
-
export declare function reactiveOmit<T extends object>(obj: T, predicate: ReactiveOmitPredicate<T>): ReactiveOmitReturn<T>;
|
|
688
|
+
export declare function reactiveOmit<T$1 extends object>(obj: T$1, predicate: ReactiveOmitPredicate<T$1>): ReactiveOmitReturn<T$1>;
|
|
711
689
|
|
|
712
|
-
export declare type ReactiveOmitPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
|
|
690
|
+
export declare type ReactiveOmitPredicate<T$1> = (value: T$1[keyof T$1], key: keyof T$1) => boolean;
|
|
713
691
|
|
|
714
|
-
declare type ReactiveOmitReturn<T extends object, K extends keyof T | undefined = undefined> = [K] extends [undefined] ? Partial<T> : Omit<T, Extract<K, keyof T>>;
|
|
692
|
+
declare type ReactiveOmitReturn<T$1 extends object, K$1 extends keyof T$1 | undefined = undefined> = [K$1] extends [undefined] ? Partial<T$1> : Omit<T$1, Extract<K$1, keyof T$1>>;
|
|
715
693
|
|
|
716
|
-
export declare function reactivePick<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): ReactivePickReturn<T, K>;
|
|
694
|
+
export declare function reactivePick<T$1 extends object, K$1 extends keyof T$1>(obj: T$1, ...keys: (K$1 | K$1[])[]): ReactivePickReturn<T$1, K$1>;
|
|
717
695
|
|
|
718
|
-
export declare function reactivePick<T extends object>(obj: T, predicate: ReactivePickPredicate<T>): ReactivePickReturn<T, keyof T>;
|
|
696
|
+
export declare function reactivePick<T$1 extends object>(obj: T$1, predicate: ReactivePickPredicate<T$1>): ReactivePickReturn<T$1, keyof T$1>;
|
|
719
697
|
|
|
720
|
-
export declare type ReactivePickPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
|
|
698
|
+
export declare type ReactivePickPredicate<T$1> = (value: T$1[keyof T$1], key: keyof T$1) => boolean;
|
|
721
699
|
|
|
722
|
-
declare type ReactivePickReturn<T extends object, K extends keyof T> = {
|
|
723
|
-
[S in K]: UnwrapRef<T[S]>;
|
|
724
|
-
};
|
|
700
|
+
declare type ReactivePickReturn<T$1 extends object, K$1 extends keyof T$1> = { [S in K$1]: UnwrapRef<T$1[S]> };
|
|
725
701
|
|
|
726
702
|
/**
|
|
727
703
|
* Maybe it's a computed ref, or a readonly value, or a getter function
|
|
728
704
|
*/
|
|
729
|
-
export declare type ReadonlyRefOrGetter<T> = ComputedRef<T> | (() => T);
|
|
705
|
+
export declare type ReadonlyRefOrGetter<T$1> = ComputedRef<T$1> | (() => T$1);
|
|
730
706
|
|
|
731
707
|
/**
|
|
732
708
|
* Create a ref which will be reset to the default value after some time.
|
|
@@ -735,30 +711,30 @@ export declare type ReadonlyRefOrGetter<T> = ComputedRef<T> | (() => T);
|
|
|
735
711
|
* @param defaultValue The value which will be set.
|
|
736
712
|
* @param afterMs A zero-or-greater delay in milliseconds.
|
|
737
713
|
*/
|
|
738
|
-
declare function refAutoReset<T>(defaultValue: MaybeRefOrGetter<T>, afterMs?: MaybeRefOrGetter<number>): RefAutoResetReturn<T>;
|
|
714
|
+
declare function refAutoReset<T$1>(defaultValue: MaybeRefOrGetter<T$1>, afterMs?: MaybeRefOrGetter<number>): RefAutoResetReturn<T$1>;
|
|
739
715
|
export { refAutoReset as autoResetRef }
|
|
740
716
|
export { refAutoReset }
|
|
741
717
|
|
|
742
|
-
declare type RefAutoResetReturn<T = any> = Ref<T>;
|
|
718
|
+
declare type RefAutoResetReturn<T$1 = any> = Ref<T$1>;
|
|
743
719
|
|
|
744
720
|
/**
|
|
745
721
|
* Debounce updates of a ref.
|
|
746
722
|
*
|
|
747
723
|
* @return A new debounced ref.
|
|
748
724
|
*/
|
|
749
|
-
declare function refDebounced<T>(value: Ref<T>, ms?: MaybeRefOrGetter<number>, options?: DebounceFilterOptions): RefDebouncedReturn<T>;
|
|
725
|
+
declare function refDebounced<T$1>(value: Ref<T$1>, ms?: MaybeRefOrGetter<number>, options?: DebounceFilterOptions): RefDebouncedReturn<T$1>;
|
|
750
726
|
export { refDebounced as debouncedRef }
|
|
751
727
|
export { refDebounced }
|
|
752
728
|
export { refDebounced as useDebounce }
|
|
753
729
|
|
|
754
|
-
declare type RefDebouncedReturn<T = any> = Readonly<Ref<T>>;
|
|
730
|
+
declare type RefDebouncedReturn<T$1 = any> = Readonly<Ref<T$1>>;
|
|
755
731
|
|
|
756
732
|
/**
|
|
757
733
|
* Apply default value to a ref.
|
|
758
734
|
*
|
|
759
735
|
* @__NO_SIDE_EFFECTS__
|
|
760
736
|
*/
|
|
761
|
-
export declare function refDefault<T>(source: Ref<T | undefined | null>, defaultValue: T): Ref<T>;
|
|
737
|
+
export declare function refDefault<T$1>(source: Ref<T$1 | undefined | null>, defaultValue: T$1): Ref<T$1>;
|
|
762
738
|
|
|
763
739
|
/**
|
|
764
740
|
* Throttle execution of a function. Especially useful for rate limiting
|
|
@@ -769,44 +745,36 @@ export declare function refDefault<T>(source: Ref<T | undefined | null>, default
|
|
|
769
745
|
* @param trailing if true, update the value again after the delay time is up
|
|
770
746
|
* @param leading if true, update the value on the leading edge of the ms timeout
|
|
771
747
|
*/
|
|
772
|
-
declare function refThrottled<T = any>(value: Ref<T>, delay?: number, trailing?: boolean, leading?: boolean): RefThrottledReturn<T>;
|
|
748
|
+
declare function refThrottled<T$1 = any>(value: Ref<T$1>, delay?: number, trailing?: boolean, leading?: boolean): RefThrottledReturn<T$1>;
|
|
773
749
|
export { refThrottled }
|
|
774
750
|
export { refThrottled as throttledRef }
|
|
775
751
|
export { refThrottled as useThrottle }
|
|
776
752
|
|
|
777
|
-
declare type RefThrottledReturn<T = any> = Ref<T>;
|
|
753
|
+
declare type RefThrottledReturn<T$1 = any> = Ref<T$1>;
|
|
778
754
|
|
|
779
755
|
/**
|
|
780
756
|
* Fine-grained controls over ref and its reactivity.
|
|
781
757
|
*
|
|
782
758
|
* @__NO_SIDE_EFFECTS__
|
|
783
759
|
*/
|
|
784
|
-
export declare function refWithControl<T>(initial: T, options?: ControlledRefOptions<T>):
|
|
785
|
-
get: (tracking?: boolean) => T;
|
|
786
|
-
set: (value: T, triggering?: boolean) => void;
|
|
787
|
-
untrackedGet: () => T;
|
|
788
|
-
silentSet: (v: T) => void;
|
|
789
|
-
peek: () => T;
|
|
790
|
-
lay: (v: T) => void;
|
|
791
|
-
}> &
|
|
760
|
+
export declare function refWithControl<T$1>(initial: T$1, options?: ControlledRefOptions<T$1>): vue0.ShallowUnwrapRef<{
|
|
761
|
+
get: (tracking?: boolean) => T$1;
|
|
762
|
+
set: (value: T$1, triggering?: boolean) => void;
|
|
763
|
+
untrackedGet: () => T$1;
|
|
764
|
+
silentSet: (v: T$1) => void;
|
|
765
|
+
peek: () => T$1;
|
|
766
|
+
lay: (v: T$1) => void;
|
|
767
|
+
}> & vue0.Ref<T$1, T$1>;
|
|
792
768
|
|
|
793
769
|
/**
|
|
794
770
|
* A ref that allow to set null or undefined
|
|
795
771
|
*/
|
|
796
|
-
export declare type RemovableRef<T> = Omit<Ref<T>, 'value'> & {
|
|
797
|
-
get value(): T;
|
|
798
|
-
set value(value: T | null | undefined);
|
|
772
|
+
export declare type RemovableRef<T$1> = Omit<Ref<T$1>, 'value'> & {
|
|
773
|
+
get value(): T$1;
|
|
774
|
+
set value(value: T$1 | null | undefined);
|
|
799
775
|
};
|
|
800
776
|
|
|
801
|
-
|
|
802
|
-
* @deprecated use `toRef` instead
|
|
803
|
-
*/
|
|
804
|
-
export declare const resolveRef: typeof toRef;
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* @deprecated use `toValue` instead
|
|
808
|
-
*/
|
|
809
|
-
export declare const resolveUnref: typeof toValue_2;
|
|
777
|
+
export { resolveRef }
|
|
810
778
|
|
|
811
779
|
export declare interface Serializer<T> {
|
|
812
780
|
read: (raw: string) => T;
|
|
@@ -818,18 +786,18 @@ export declare interface SerializerAsync<T> {
|
|
|
818
786
|
write: (value: T) => Awaitable<string>;
|
|
819
787
|
}
|
|
820
788
|
|
|
821
|
-
export declare function set<T>(ref: Ref<T>, value: T): void;
|
|
789
|
+
export declare function set<T$1>(ref: Ref<T$1>, value: T$1): void;
|
|
822
790
|
|
|
823
|
-
export declare function set<O extends object, K extends keyof O>(target: O, key: K, value: O[K]): void;
|
|
791
|
+
export declare function set<O extends object, K$1 extends keyof O>(target: O, key: K$1, value: O[K$1]): void;
|
|
824
792
|
|
|
825
|
-
declare type ShallowOrDeepRef<T = any, D extends boolean = false> = D extends true ? Ref<T> : ShallowRef<T>;
|
|
793
|
+
declare type ShallowOrDeepRef<T$1 = any, D extends boolean = false> = D extends true ? Ref<T$1> : ShallowRef<T$1>;
|
|
826
794
|
|
|
827
|
-
export declare type ShallowUnwrapRef<T> = T extends Ref<infer P> ? P : T;
|
|
795
|
+
export declare type ShallowUnwrapRef<T$1> = T$1 extends Ref<infer P> ? P : T$1;
|
|
828
796
|
|
|
829
|
-
declare type SharedComposableReturn<T extends AnyFn = AnyFn> = T;
|
|
797
|
+
declare type SharedComposableReturn<T$1 extends AnyFn = AnyFn> = T$1;
|
|
830
798
|
|
|
831
|
-
export declare interface SingletonPromiseReturn<T> {
|
|
832
|
-
(): Promise<T>;
|
|
799
|
+
export declare interface SingletonPromiseReturn<T$1> {
|
|
800
|
+
(): Promise<T$1>;
|
|
833
801
|
/**
|
|
834
802
|
* Reset current staled promise.
|
|
835
803
|
* await it to have proper shutdown.
|
|
@@ -837,7 +805,7 @@ export declare interface SingletonPromiseReturn<T> {
|
|
|
837
805
|
reset: () => Promise<void>;
|
|
838
806
|
}
|
|
839
807
|
|
|
840
|
-
declare type SpecificFieldPartial<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
|
|
808
|
+
declare type SpecificFieldPartial<T$1, K$1 extends keyof T$1> = Partial<Pick<T$1, K$1>> & Omit<T$1, K$1>;
|
|
841
809
|
|
|
842
810
|
export declare interface Stoppable<StartFnArgs extends any[] = any[]> {
|
|
843
811
|
/**
|
|
@@ -854,15 +822,15 @@ export declare interface Stoppable<StartFnArgs extends any[] = any[]> {
|
|
|
854
822
|
start: (...args: StartFnArgs) => void;
|
|
855
823
|
}
|
|
856
824
|
|
|
857
|
-
declare type StrictIncludeMap<IncludeType extends 'LR' | 'RL', D extends Exclude<Direction, 'both'>, L, R> = (Equal<[IncludeType, D], ['LR', 'ltr']> & Equal<[IncludeType, D], ['RL', 'rtl']>) extends true ? {
|
|
858
|
-
transform?: SpecificFieldPartial<Pick<Transform<L, R>, D>, D>;
|
|
825
|
+
declare type StrictIncludeMap<IncludeType extends 'LR' | 'RL', D extends Exclude<Direction, 'both'>, L, R$1> = (Equal<[IncludeType, D], ['LR', 'ltr']> & Equal<[IncludeType, D], ['RL', 'rtl']>) extends true ? {
|
|
826
|
+
transform?: SpecificFieldPartial<Pick<Transform<L, R$1>, D>, D>;
|
|
859
827
|
} : {
|
|
860
|
-
transform: Pick<Transform<L, R>, D>;
|
|
828
|
+
transform: Pick<Transform<L, R$1>, D>;
|
|
861
829
|
};
|
|
862
830
|
|
|
863
|
-
declare type StrictIncludeType<IncludeType extends 'LR' | 'RL', D extends Direction, L, R> = D extends 'both' ? {
|
|
864
|
-
transform: SpecificFieldPartial<Transform<L, R>, IncludeType extends 'LR' ? 'ltr' : 'rtl'>;
|
|
865
|
-
} : D extends Exclude<Direction, 'both'> ? StrictIncludeMap<IncludeType, D, L, R> : never;
|
|
831
|
+
declare type StrictIncludeType<IncludeType extends 'LR' | 'RL', D extends Direction, L, R$1> = D extends 'both' ? {
|
|
832
|
+
transform: SpecificFieldPartial<Transform<L, R$1>, IncludeType extends 'LR' ? 'ltr' : 'rtl'>;
|
|
833
|
+
} : D extends Exclude<Direction, 'both'> ? StrictIncludeMap<IncludeType, D, L, R$1> : never;
|
|
866
834
|
|
|
867
835
|
/**
|
|
868
836
|
* Two-way refs synchronization.
|
|
@@ -873,9 +841,9 @@ declare type StrictIncludeType<IncludeType extends 'LR' | 'RL', D extends Direct
|
|
|
873
841
|
* 3. L ⊆ R
|
|
874
842
|
* 4. L ∩ R = ∅
|
|
875
843
|
*/
|
|
876
|
-
export declare function syncRef<L, R, D extends Direction = 'both'>(left: Ref<L>, right: Ref<R>, ...[options]: Equal<L, R> extends true ? [options?: SyncRefOptions<L, R, D>] : [options: SyncRefOptions<L, R, D>]): () => void;
|
|
844
|
+
export declare function syncRef<L, R$1, D extends Direction = 'both'>(left: Ref<L>, right: Ref<R$1>, ...[options]: Equal<L, R$1> extends true ? [options?: SyncRefOptions<L, R$1, D>] : [options: SyncRefOptions<L, R$1, D>]): () => void;
|
|
877
845
|
|
|
878
|
-
export declare type SyncRefOptions<L, R, D extends Direction> = ConfigurableFlushSync & {
|
|
846
|
+
export declare type SyncRefOptions<L, R$1, D extends Direction> = ConfigurableFlushSync & {
|
|
879
847
|
/**
|
|
880
848
|
* Watch deeply
|
|
881
849
|
*
|
|
@@ -894,7 +862,7 @@ export declare type SyncRefOptions<L, R, D extends Direction> = ConfigurableFlus
|
|
|
894
862
|
* @default 'both'
|
|
895
863
|
*/
|
|
896
864
|
direction?: D;
|
|
897
|
-
} & TransformType<D, L, R>;
|
|
865
|
+
} & TransformType<D, L, R$1>;
|
|
898
866
|
|
|
899
867
|
/**
|
|
900
868
|
* Keep target ref(s) in sync with the source ref
|
|
@@ -902,7 +870,7 @@ export declare type SyncRefOptions<L, R, D extends Direction> = ConfigurableFlus
|
|
|
902
870
|
* @param source source ref
|
|
903
871
|
* @param targets
|
|
904
872
|
*/
|
|
905
|
-
export declare function syncRefs<T>(source: WatchSource<T>, targets: Ref<T> | Ref<T>[], options?: SyncRefsOptions):
|
|
873
|
+
export declare function syncRefs<T$1>(source: WatchSource<T$1>, targets: Ref<T$1> | Ref<T$1>[], options?: SyncRefsOptions): vue0.WatchHandle;
|
|
906
874
|
|
|
907
875
|
export declare interface SyncRefsOptions extends ConfigurableFlushSync {
|
|
908
876
|
/**
|
|
@@ -962,22 +930,22 @@ export declare interface ToDataURLOptions extends UseBase64Options {
|
|
|
962
930
|
* @see https://vueuse.org/toReactive
|
|
963
931
|
* @param objectRef A ref of object
|
|
964
932
|
*/
|
|
965
|
-
export declare function toReactive<T extends object>(objectRef: MaybeRef<T>): UnwrapNestedRefs<T>;
|
|
933
|
+
export declare function toReactive<T$1 extends object>(objectRef: MaybeRef<T$1>): UnwrapNestedRefs<T$1>;
|
|
966
934
|
|
|
967
935
|
/**
|
|
968
936
|
* Normalize value/ref/getter to `ref` or `computed`.
|
|
969
937
|
*/
|
|
970
|
-
export declare function toRef<T>(r: () => T): Readonly<Ref<T>>;
|
|
938
|
+
export declare function toRef<T$1>(r: () => T$1): Readonly<Ref<T$1>>;
|
|
971
939
|
|
|
972
|
-
export declare function toRef<T>(r: ComputedRef<T>): ComputedRef<T>;
|
|
940
|
+
export declare function toRef<T$1>(r: ComputedRef<T$1>): ComputedRef<T$1>;
|
|
973
941
|
|
|
974
|
-
export declare function toRef<T>(r: MaybeRefOrGetter<T>): Ref<T>;
|
|
942
|
+
export declare function toRef<T$1>(r: MaybeRefOrGetter<T$1>): Ref<T$1>;
|
|
975
943
|
|
|
976
|
-
export declare function toRef<T>(r: T): Ref<T>;
|
|
944
|
+
export declare function toRef<T$1>(r: T$1): Ref<T$1>;
|
|
977
945
|
|
|
978
|
-
export declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>;
|
|
946
|
+
export declare function toRef<T$1 extends object, K$1 extends keyof T$1>(object: T$1, key: K$1): ToRef<T$1[K$1]>;
|
|
979
947
|
|
|
980
|
-
export declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<Exclude<T[K], undefined>>;
|
|
948
|
+
export declare function toRef<T$1 extends object, K$1 extends keyof T$1>(object: T$1, key: K$1, defaultValue: T$1[K$1]): ToRef<Exclude<T$1[K$1], undefined>>;
|
|
981
949
|
|
|
982
950
|
/**
|
|
983
951
|
* Extended `toRefs` that also accepts refs of an object.
|
|
@@ -986,7 +954,7 @@ export declare function toRef<T extends object, K extends keyof T>(object: T, ke
|
|
|
986
954
|
* @param objectRef A ref or normal object or array.
|
|
987
955
|
* @param options Options
|
|
988
956
|
*/
|
|
989
|
-
export declare function toRefs<T extends object>(objectRef: MaybeRef<T>, options?: ToRefsOptions): ToRefs<T>;
|
|
957
|
+
export declare function toRefs<T$1 extends object>(objectRef: MaybeRef<T$1>, options?: ToRefsOptions): ToRefs<T$1>;
|
|
990
958
|
|
|
991
959
|
export declare interface ToRefsOptions {
|
|
992
960
|
/**
|
|
@@ -997,30 +965,24 @@ export declare interface ToRefsOptions {
|
|
|
997
965
|
replaceRef?: MaybeRefOrGetter<boolean>;
|
|
998
966
|
}
|
|
999
967
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
*
|
|
1003
|
-
* @deprecated use `toValue` from `vue` instead
|
|
1004
|
-
*/
|
|
1005
|
-
export declare const toValue: typeof toValue_2;
|
|
968
|
+
export { toValue as resolveUnref }
|
|
969
|
+
export { toValue }
|
|
1006
970
|
|
|
1007
|
-
declare interface Transform<L, R> {
|
|
1008
|
-
ltr: (left: L) => R;
|
|
1009
|
-
rtl: (right: R) => L;
|
|
971
|
+
declare interface Transform<L, R$1> {
|
|
972
|
+
ltr: (left: L) => R$1;
|
|
973
|
+
rtl: (right: R$1) => L;
|
|
1010
974
|
}
|
|
1011
975
|
|
|
1012
|
-
declare type TransformType<D extends Direction, L, R> = Equal<L, R> extends true ? EqualType<D, L, R> : IncludeButNotEqual<L, R> extends true ? StrictIncludeType<'LR', D, L, R> : IncludeButNotEqual<R, L> extends true ? StrictIncludeType<'RL', D, L, R> : IntersectButNotEqual<L, R> extends true ? IntersectButNotEqualType<D, L, R> : NotIntersect<L, R> extends true ? NotIntersectType<D, L, R> : never;
|
|
976
|
+
declare type TransformType<D extends Direction, L, R$1> = Equal<L, R$1> extends true ? EqualType<D, L, R$1> : IncludeButNotEqual<L, R$1> extends true ? StrictIncludeType<'LR', D, L, R$1> : IncludeButNotEqual<R$1, L> extends true ? StrictIncludeType<'RL', D, L, R$1> : IntersectButNotEqual<L, R$1> extends true ? IntersectButNotEqualType<D, L, R$1> : NotIntersect<L, R$1> extends true ? NotIntersectType<D, L, R$1> : never;
|
|
1013
977
|
|
|
1014
978
|
/**
|
|
1015
979
|
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
1016
980
|
*
|
|
1017
981
|
* @param fn
|
|
1018
982
|
*/
|
|
1019
|
-
export declare function tryOnScopeDispose(fn: Fn): boolean;
|
|
983
|
+
export declare function tryOnScopeDispose(fn: Fn, failSilently?: boolean): boolean;
|
|
1020
984
|
|
|
1021
|
-
export declare type UnrefFn<T> = T extends (...args: infer A) => infer R ? (...args: {
|
|
1022
|
-
[K in keyof A]: MaybeRef<A[K]>;
|
|
1023
|
-
}) => R : never;
|
|
985
|
+
export declare type UnrefFn<T> = T extends ((...args: infer A) => infer R) ? (...args: { [K in keyof A]: MaybeRef<A[K]> }) => R : never;
|
|
1024
986
|
|
|
1025
987
|
/**
|
|
1026
988
|
* Promised one-time watch for changes
|
|
@@ -1035,19 +997,19 @@ export declare type UnrefFn<T> = T extends (...args: infer A) => infer R ? (...a
|
|
|
1035
997
|
* alert('Counter is now larger than 7!')
|
|
1036
998
|
* ```
|
|
1037
999
|
*/
|
|
1038
|
-
export declare function until<T extends unknown[]>(r: WatchSource<T> | MaybeRefOrGetter<T>): UntilArrayInstance<T>;
|
|
1000
|
+
export declare function until<T$1 extends unknown[]>(r: WatchSource<T$1> | MaybeRefOrGetter<T$1>): UntilArrayInstance<T$1>;
|
|
1039
1001
|
|
|
1040
|
-
export declare function until<T>(r: WatchSource<T> | MaybeRefOrGetter<T>): UntilValueInstance<T>;
|
|
1002
|
+
export declare function until<T$1>(r: WatchSource<T$1> | MaybeRefOrGetter<T$1>): UntilValueInstance<T$1>;
|
|
1041
1003
|
|
|
1042
|
-
export declare interface UntilArrayInstance<T> extends UntilBaseInstance<T> {
|
|
1043
|
-
readonly not: UntilArrayInstance<T>;
|
|
1044
|
-
toContains: (value: MaybeRefOrGetter<ElementOf<ShallowUnwrapRef<T>>>, options?: UntilToMatchOptions) => Promise<T>;
|
|
1004
|
+
export declare interface UntilArrayInstance<T$1> extends UntilBaseInstance<T$1> {
|
|
1005
|
+
readonly not: UntilArrayInstance<T$1>;
|
|
1006
|
+
toContains: (value: MaybeRefOrGetter<ElementOf<ShallowUnwrapRef<T$1>>>, options?: UntilToMatchOptions) => Promise<T$1>;
|
|
1045
1007
|
}
|
|
1046
1008
|
|
|
1047
|
-
declare interface UntilBaseInstance<T, Not extends boolean = false> {
|
|
1048
|
-
toMatch: (<U extends T = T>(condition: (v: T) => v is U, options?: UntilToMatchOptions) => Not extends true ? Promise<Exclude<T, U>> : Promise<U>) & ((condition: (v: T) => boolean, options?: UntilToMatchOptions) => Promise<T>);
|
|
1049
|
-
changed: (options?: UntilToMatchOptions) => Promise<T>;
|
|
1050
|
-
changedTimes: (n?: number, options?: UntilToMatchOptions) => Promise<T>;
|
|
1009
|
+
declare interface UntilBaseInstance<T$1, Not extends boolean = false> {
|
|
1010
|
+
toMatch: (<U extends T$1 = T$1>(condition: (v: T$1) => v is U, options?: UntilToMatchOptions) => Not extends true ? Promise<Exclude<T$1, U>> : Promise<U>) & ((condition: (v: T$1) => boolean, options?: UntilToMatchOptions) => Promise<T$1>);
|
|
1011
|
+
changed: (options?: UntilToMatchOptions) => Promise<T$1>;
|
|
1012
|
+
changedTimes: (n?: number, options?: UntilToMatchOptions) => Promise<T$1>;
|
|
1051
1013
|
}
|
|
1052
1014
|
|
|
1053
1015
|
export declare interface UntilToMatchOptions {
|
|
@@ -1069,7 +1031,7 @@ export declare interface UntilToMatchOptions {
|
|
|
1069
1031
|
*
|
|
1070
1032
|
* @default 'sync'
|
|
1071
1033
|
*/
|
|
1072
|
-
flush?:
|
|
1034
|
+
flush?: WatchOptionFlush;
|
|
1073
1035
|
/**
|
|
1074
1036
|
* `deep` option for internal watch
|
|
1075
1037
|
*
|
|
@@ -1078,20 +1040,20 @@ export declare interface UntilToMatchOptions {
|
|
|
1078
1040
|
deep?: WatchOptions['deep'];
|
|
1079
1041
|
}
|
|
1080
1042
|
|
|
1081
|
-
export declare interface UntilValueInstance<T, Not extends boolean = false> extends UntilBaseInstance<T, Not> {
|
|
1082
|
-
readonly not: UntilValueInstance<T, Not extends true ? false : true>;
|
|
1083
|
-
toBe: <P = T>(value: MaybeRefOrGetter<P>, options?: UntilToMatchOptions) => Not extends true ? Promise<T> : Promise<P>;
|
|
1084
|
-
toBeTruthy: (options?: UntilToMatchOptions) => Not extends true ? Promise<T & Falsy> : Promise<Exclude<T, Falsy>>;
|
|
1085
|
-
toBeNull: (options?: UntilToMatchOptions) => Not extends true ? Promise<Exclude<T, null>> : Promise<null>;
|
|
1086
|
-
toBeUndefined: (options?: UntilToMatchOptions) => Not extends true ? Promise<Exclude<T, undefined>> : Promise<undefined>;
|
|
1087
|
-
toBeNaN: (options?: UntilToMatchOptions) => Promise<T>;
|
|
1043
|
+
export declare interface UntilValueInstance<T$1, Not extends boolean = false> extends UntilBaseInstance<T$1, Not> {
|
|
1044
|
+
readonly not: UntilValueInstance<T$1, Not extends true ? false : true>;
|
|
1045
|
+
toBe: <P = T$1>(value: MaybeRefOrGetter<P>, options?: UntilToMatchOptions) => Not extends true ? Promise<T$1> : Promise<P>;
|
|
1046
|
+
toBeTruthy: (options?: UntilToMatchOptions) => Not extends true ? Promise<T$1 & Falsy> : Promise<Exclude<T$1, Falsy>>;
|
|
1047
|
+
toBeNull: (options?: UntilToMatchOptions) => Not extends true ? Promise<Exclude<T$1, null>> : Promise<null>;
|
|
1048
|
+
toBeUndefined: (options?: UntilToMatchOptions) => Not extends true ? Promise<Exclude<T$1, undefined>> : Promise<undefined>;
|
|
1049
|
+
toBeNaN: (options?: UntilToMatchOptions) => Promise<T$1>;
|
|
1088
1050
|
}
|
|
1089
1051
|
|
|
1090
1052
|
export declare type UrlParams = Record<string, string[] | string>;
|
|
1091
1053
|
|
|
1092
|
-
export declare function useArrayDifference<T>(list: MaybeRefOrGetter<T[]>, values: MaybeRefOrGetter<T[]>, key?: keyof T, options?: UseArrayDifferenceOptions): UseArrayDifferenceReturn<T>;
|
|
1054
|
+
export declare function useArrayDifference<T$1>(list: MaybeRefOrGetter<T$1[]>, values: MaybeRefOrGetter<T$1[]>, key?: keyof T$1, options?: UseArrayDifferenceOptions): UseArrayDifferenceReturn<T$1>;
|
|
1093
1055
|
|
|
1094
|
-
export declare function useArrayDifference<T>(list: MaybeRefOrGetter<T[]>, values: MaybeRefOrGetter<T[]>, compareFn?: (value: T, othVal: T) => boolean, options?: UseArrayDifferenceOptions): UseArrayDifferenceReturn<T>;
|
|
1056
|
+
export declare function useArrayDifference<T$1>(list: MaybeRefOrGetter<T$1[]>, values: MaybeRefOrGetter<T$1[]>, compareFn?: (value: T$1, othVal: T$1) => boolean, options?: UseArrayDifferenceOptions): UseArrayDifferenceReturn<T$1>;
|
|
1095
1057
|
|
|
1096
1058
|
declare interface UseArrayDifferenceOptions {
|
|
1097
1059
|
/**
|
|
@@ -1103,7 +1065,7 @@ declare interface UseArrayDifferenceOptions {
|
|
|
1103
1065
|
symmetric?: boolean;
|
|
1104
1066
|
}
|
|
1105
1067
|
|
|
1106
|
-
declare type UseArrayDifferenceReturn<T = any> = ComputedRef<T[]>;
|
|
1068
|
+
declare type UseArrayDifferenceReturn<T$1 = any> = ComputedRef<T$1[]>;
|
|
1107
1069
|
|
|
1108
1070
|
/**
|
|
1109
1071
|
* Reactive `Array.every`
|
|
@@ -1116,7 +1078,7 @@ declare type UseArrayDifferenceReturn<T = any> = ComputedRef<T[]>;
|
|
|
1116
1078
|
*
|
|
1117
1079
|
* @__NO_SIDE_EFFECTS__
|
|
1118
1080
|
*/
|
|
1119
|
-
export declare function useArrayEvery<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => unknown): UseArrayEveryReturn;
|
|
1081
|
+
export declare function useArrayEvery<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: MaybeRefOrGetter<T$1>[]) => unknown): UseArrayEveryReturn;
|
|
1120
1082
|
|
|
1121
1083
|
declare type UseArrayEveryReturn = ComputedRef<boolean>;
|
|
1122
1084
|
|
|
@@ -1131,11 +1093,11 @@ declare type UseArrayEveryReturn = ComputedRef<boolean>;
|
|
|
1131
1093
|
*
|
|
1132
1094
|
* @__NO_SIDE_EFFECTS__
|
|
1133
1095
|
*/
|
|
1134
|
-
export declare function useArrayFilter<T, S extends T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: T[]) => element is S): UseArrayFilterReturn<S>;
|
|
1096
|
+
export declare function useArrayFilter<T$1, S$1 extends T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: T$1[]) => element is S$1): UseArrayFilterReturn<S$1>;
|
|
1135
1097
|
|
|
1136
|
-
export declare function useArrayFilter<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: T[]) => unknown): UseArrayFilterReturn<T>;
|
|
1098
|
+
export declare function useArrayFilter<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: T$1[]) => unknown): UseArrayFilterReturn<T$1>;
|
|
1137
1099
|
|
|
1138
|
-
declare type UseArrayFilterReturn<T = any> = ComputedRef<T[]>;
|
|
1100
|
+
declare type UseArrayFilterReturn<T$1 = any> = ComputedRef<T$1[]>;
|
|
1139
1101
|
|
|
1140
1102
|
/**
|
|
1141
1103
|
* Reactive `Array.find`
|
|
@@ -1148,7 +1110,7 @@ declare type UseArrayFilterReturn<T = any> = ComputedRef<T[]>;
|
|
|
1148
1110
|
*
|
|
1149
1111
|
* @__NO_SIDE_EFFECTS__
|
|
1150
1112
|
*/
|
|
1151
|
-
export declare function useArrayFind<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => boolean): UseArrayFindReturn<T>;
|
|
1113
|
+
export declare function useArrayFind<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: MaybeRefOrGetter<T$1>[]) => boolean): UseArrayFindReturn<T$1>;
|
|
1152
1114
|
|
|
1153
1115
|
/**
|
|
1154
1116
|
* Reactive `Array.findIndex`
|
|
@@ -1161,7 +1123,7 @@ export declare function useArrayFind<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<
|
|
|
1161
1123
|
*
|
|
1162
1124
|
* @__NO_SIDE_EFFECTS__
|
|
1163
1125
|
*/
|
|
1164
|
-
export declare function useArrayFindIndex<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => unknown): UseArrayFindIndexReturn;
|
|
1126
|
+
export declare function useArrayFindIndex<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: MaybeRefOrGetter<T$1>[]) => unknown): UseArrayFindIndexReturn;
|
|
1165
1127
|
|
|
1166
1128
|
declare type UseArrayFindIndexReturn = ComputedRef<number>;
|
|
1167
1129
|
|
|
@@ -1176,11 +1138,11 @@ declare type UseArrayFindIndexReturn = ComputedRef<number>;
|
|
|
1176
1138
|
*
|
|
1177
1139
|
* @__NO_SIDE_EFFECTS__
|
|
1178
1140
|
*/
|
|
1179
|
-
export declare function useArrayFindLast<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => boolean): UseArrayFindLastReturn<T>;
|
|
1141
|
+
export declare function useArrayFindLast<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: MaybeRefOrGetter<T$1>[]) => boolean): UseArrayFindLastReturn<T$1>;
|
|
1180
1142
|
|
|
1181
|
-
declare type UseArrayFindLastReturn<T = any> = ComputedRef<T | undefined>;
|
|
1143
|
+
declare type UseArrayFindLastReturn<T$1 = any> = ComputedRef<T$1 | undefined>;
|
|
1182
1144
|
|
|
1183
|
-
declare type UseArrayFindReturn<T = any> = ComputedRef<T | undefined>;
|
|
1145
|
+
declare type UseArrayFindReturn<T$1 = any> = ComputedRef<T$1 | undefined>;
|
|
1184
1146
|
|
|
1185
1147
|
/**
|
|
1186
1148
|
* Reactive `Array.includes`
|
|
@@ -1191,17 +1153,17 @@ declare type UseArrayFindReturn<T = any> = ComputedRef<T | undefined>;
|
|
|
1191
1153
|
*
|
|
1192
1154
|
* @__NO_SIDE_EFFECTS__
|
|
1193
1155
|
*/
|
|
1194
|
-
export declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, value: MaybeRefOrGetter<V>, comparator?: UseArrayIncludesComparatorFn<T, V>): UseArrayIncludesReturn;
|
|
1156
|
+
export declare function useArrayIncludes<T$1, V$1 = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, value: MaybeRefOrGetter<V$1>, comparator?: UseArrayIncludesComparatorFn<T$1, V$1>): UseArrayIncludesReturn;
|
|
1195
1157
|
|
|
1196
|
-
export declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, value: MaybeRefOrGetter<V>, comparator?: keyof T): UseArrayIncludesReturn;
|
|
1158
|
+
export declare function useArrayIncludes<T$1, V$1 = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, value: MaybeRefOrGetter<V$1>, comparator?: keyof T$1): UseArrayIncludesReturn;
|
|
1197
1159
|
|
|
1198
|
-
export declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, value: MaybeRefOrGetter<V>, options?: UseArrayIncludesOptions<T, V>): UseArrayIncludesReturn;
|
|
1160
|
+
export declare function useArrayIncludes<T$1, V$1 = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, value: MaybeRefOrGetter<V$1>, options?: UseArrayIncludesOptions<T$1, V$1>): UseArrayIncludesReturn;
|
|
1199
1161
|
|
|
1200
|
-
export declare type UseArrayIncludesComparatorFn<T, V> = ((element: T, value: V, index: number, array: MaybeRefOrGetter<T>[]) => boolean);
|
|
1162
|
+
export declare type UseArrayIncludesComparatorFn<T$1, V$1> = ((element: T$1, value: V$1, index: number, array: MaybeRefOrGetter<T$1>[]) => boolean);
|
|
1201
1163
|
|
|
1202
|
-
export declare interface UseArrayIncludesOptions<T, V> {
|
|
1164
|
+
export declare interface UseArrayIncludesOptions<T$1, V$1> {
|
|
1203
1165
|
fromIndex?: number;
|
|
1204
|
-
comparator?: UseArrayIncludesComparatorFn<T, V> | keyof T;
|
|
1166
|
+
comparator?: UseArrayIncludesComparatorFn<T$1, V$1> | keyof T$1;
|
|
1205
1167
|
}
|
|
1206
1168
|
|
|
1207
1169
|
declare type UseArrayIncludesReturn = ComputedRef<boolean>;
|
|
@@ -1232,9 +1194,9 @@ declare type UseArrayJoinReturn = ComputedRef<string>;
|
|
|
1232
1194
|
*
|
|
1233
1195
|
* @__NO_SIDE_EFFECTS__
|
|
1234
1196
|
*/
|
|
1235
|
-
export declare function useArrayMap<T, U = T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: T[]) => U): UseArrayMapReturn<U>;
|
|
1197
|
+
export declare function useArrayMap<T$1, U$1 = T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: T$1[]) => U$1): UseArrayMapReturn<U$1>;
|
|
1236
1198
|
|
|
1237
|
-
declare type UseArrayMapReturn<T = any> = ComputedRef<T[]>;
|
|
1199
|
+
declare type UseArrayMapReturn<T$1 = any> = ComputedRef<T$1[]>;
|
|
1238
1200
|
|
|
1239
1201
|
/**
|
|
1240
1202
|
* Reactive `Array.reduce`
|
|
@@ -1247,7 +1209,7 @@ declare type UseArrayMapReturn<T = any> = ComputedRef<T[]>;
|
|
|
1247
1209
|
*
|
|
1248
1210
|
* @__NO_SIDE_EFFECTS__
|
|
1249
1211
|
*/
|
|
1250
|
-
export declare function useArrayReduce<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, reducer: UseArrayReducer<T, T, T>): ComputedRef<T>;
|
|
1212
|
+
export declare function useArrayReduce<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, reducer: UseArrayReducer<T$1, T$1, T$1>): ComputedRef<T$1>;
|
|
1251
1213
|
|
|
1252
1214
|
/**
|
|
1253
1215
|
* Reactive `Array.reduce`
|
|
@@ -1261,9 +1223,9 @@ export declare function useArrayReduce<T>(list: MaybeRefOrGetter<MaybeRefOrGette
|
|
|
1261
1223
|
*
|
|
1262
1224
|
* @__NO_SIDE_EFFECTS__
|
|
1263
1225
|
*/
|
|
1264
|
-
export declare function useArrayReduce<T, U>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, reducer: UseArrayReducer<U, T, U>, initialValue: MaybeRefOrGetter<U>): ComputedRef<U>;
|
|
1226
|
+
export declare function useArrayReduce<T$1, U$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, reducer: UseArrayReducer<U$1, T$1, U$1>, initialValue: MaybeRefOrGetter<U$1>): ComputedRef<U$1>;
|
|
1265
1227
|
|
|
1266
|
-
export declare type UseArrayReducer<PV, CV, R> = (previousValue: PV, currentValue: CV, currentIndex: number) => R;
|
|
1228
|
+
export declare type UseArrayReducer<PV, CV, R$1> = (previousValue: PV, currentValue: CV, currentIndex: number) => R$1;
|
|
1267
1229
|
|
|
1268
1230
|
/**
|
|
1269
1231
|
* Reactive `Array.some`
|
|
@@ -1276,7 +1238,7 @@ export declare type UseArrayReducer<PV, CV, R> = (previousValue: PV, currentValu
|
|
|
1276
1238
|
*
|
|
1277
1239
|
* @__NO_SIDE_EFFECTS__
|
|
1278
1240
|
*/
|
|
1279
|
-
export declare function useArraySome<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => unknown): UseArraySomeReturn;
|
|
1241
|
+
export declare function useArraySome<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, fn: (element: T$1, index: number, array: MaybeRefOrGetter<T$1>[]) => unknown): UseArraySomeReturn;
|
|
1280
1242
|
|
|
1281
1243
|
declare type UseArraySomeReturn = ComputedRef<boolean>;
|
|
1282
1244
|
|
|
@@ -1289,9 +1251,9 @@ declare type UseArraySomeReturn = ComputedRef<boolean>;
|
|
|
1289
1251
|
*
|
|
1290
1252
|
* @__NO_SIDE_EFFECTS__
|
|
1291
1253
|
*/
|
|
1292
|
-
export declare function useArrayUnique<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, compareFn?: (a: T, b: T, array: T[]) => boolean): UseArrayUniqueReturn<T>;
|
|
1254
|
+
export declare function useArrayUnique<T$1>(list: MaybeRefOrGetter<MaybeRefOrGetter<T$1>[]>, compareFn?: (a: T$1, b: T$1, array: T$1[]) => boolean): UseArrayUniqueReturn<T$1>;
|
|
1293
1255
|
|
|
1294
|
-
declare type UseArrayUniqueReturn<T = any> = ComputedRef<T[]>;
|
|
1256
|
+
declare type UseArrayUniqueReturn<T$1 = any> = ComputedRef<T$1[]>;
|
|
1295
1257
|
|
|
1296
1258
|
/**
|
|
1297
1259
|
* Asynchronous queue task controller.
|
|
@@ -1300,9 +1262,7 @@ declare type UseArrayUniqueReturn<T = any> = ComputedRef<T[]>;
|
|
|
1300
1262
|
* @param tasks
|
|
1301
1263
|
* @param options
|
|
1302
1264
|
*/
|
|
1303
|
-
export declare function useAsyncQueue<T extends any[], S = MapQueueTask<T>>(tasks: S & Array<UseAsyncQueueTask<any>>, options?: UseAsyncQueueOptions): UseAsyncQueueReturn<{
|
|
1304
|
-
[P in keyof T]: UseAsyncQueueResult<T[P]>;
|
|
1305
|
-
}>;
|
|
1265
|
+
export declare function useAsyncQueue<T extends any[], S = MapQueueTask<T>>(tasks: S & Array<UseAsyncQueueTask<any>>, options?: UseAsyncQueueOptions): UseAsyncQueueReturn<{ [P in keyof T]: UseAsyncQueueResult<T[P]> }>;
|
|
1306
1266
|
|
|
1307
1267
|
export declare interface UseAsyncQueueOptions {
|
|
1308
1268
|
/**
|
|
@@ -1456,7 +1416,7 @@ export declare interface UseBase64Return {
|
|
|
1456
1416
|
* @param options
|
|
1457
1417
|
*
|
|
1458
1418
|
*/
|
|
1459
|
-
export declare function useBroadcastChannel<D, P>(options: UseBroadcastChannelOptions): UseBroadcastChannelReturn<D, P>;
|
|
1419
|
+
export declare function useBroadcastChannel<D, P$1>(options: UseBroadcastChannelOptions): UseBroadcastChannelReturn<D, P$1>;
|
|
1460
1420
|
|
|
1461
1421
|
export declare interface UseBroadcastChannelOptions extends ConfigurableWindow {
|
|
1462
1422
|
/**
|
|
@@ -1465,11 +1425,11 @@ export declare interface UseBroadcastChannelOptions extends ConfigurableWindow {
|
|
|
1465
1425
|
name: string;
|
|
1466
1426
|
}
|
|
1467
1427
|
|
|
1468
|
-
export declare interface UseBroadcastChannelReturn<D, P> {
|
|
1428
|
+
export declare interface UseBroadcastChannelReturn<D, P$1> {
|
|
1469
1429
|
isSupported: ComputedRef<boolean>;
|
|
1470
1430
|
channel: Ref<BroadcastChannel | undefined>;
|
|
1471
1431
|
data: Ref<D>;
|
|
1472
|
-
post: (data: P) => void;
|
|
1432
|
+
post: (data: P$1) => void;
|
|
1473
1433
|
close: () => void;
|
|
1474
1434
|
error: ShallowRef<Event | null>;
|
|
1475
1435
|
isClosed: ShallowRef<boolean>;
|
|
@@ -1514,8 +1474,7 @@ export declare type UseBrowserLocationReturn = ReturnType<typeof useBrowserLocat
|
|
|
1514
1474
|
|
|
1515
1475
|
export declare function useCached<T, D extends boolean = true>(refValue: Ref<T>, comparator?: (a: T, b: T) => boolean, options?: UseCachedOptions<D>): UseCachedReturn<T, D>;
|
|
1516
1476
|
|
|
1517
|
-
declare interface UseCachedOptions<D extends boolean = true> extends ConfigurableDeepRefs<D>, WatchOptions {
|
|
1518
|
-
}
|
|
1477
|
+
declare interface UseCachedOptions<D extends boolean = true> extends ConfigurableDeepRefs<D>, WatchOptions {}
|
|
1519
1478
|
|
|
1520
1479
|
declare type UseCachedReturn<T = any, D extends boolean = true> = ShallowOrDeepRef<T, D>;
|
|
1521
1480
|
|
|
@@ -1559,7 +1518,7 @@ export declare interface UseClonedReturn<T> {
|
|
|
1559
1518
|
* @param options
|
|
1560
1519
|
*/
|
|
1561
1520
|
export declare function useCounter(initialValue?: MaybeRef<number>, options?: UseCounterOptions): {
|
|
1562
|
-
count: Readonly<Ref<number, number> |
|
|
1521
|
+
count: Readonly<Ref<number, number> | vue0.ShallowRef<number, number> | vue0.WritableComputedRef<number, number>>;
|
|
1563
1522
|
inc: (delta?: number) => number;
|
|
1564
1523
|
dec: (delta?: number) => number;
|
|
1565
1524
|
get: () => number;
|
|
@@ -1657,30 +1616,30 @@ export declare function useDebouncedRefHistory<Raw, Serialized = Raw>(source: Re
|
|
|
1657
1616
|
*
|
|
1658
1617
|
* @__NO_SIDE_EFFECTS__
|
|
1659
1618
|
*/
|
|
1660
|
-
export declare function useDebounceFn<T extends FunctionArgs>(fn: T, ms?: MaybeRefOrGetter<number>, options?: DebounceFilterOptions): UseDebounceFnReturn<T>;
|
|
1619
|
+
export declare function useDebounceFn<T$1 extends FunctionArgs>(fn: T$1, ms?: MaybeRefOrGetter<number>, options?: DebounceFilterOptions): UseDebounceFnReturn<T$1>;
|
|
1661
1620
|
|
|
1662
|
-
declare type UseDebounceFnReturn<T extends FunctionArgs> = PromisifyFn<T>;
|
|
1621
|
+
declare type UseDebounceFnReturn<T$1 extends FunctionArgs> = PromisifyFn<T$1>;
|
|
1663
1622
|
|
|
1664
|
-
export declare function useEventBus<T = unknown, P = any>(key: EventBusIdentifier<T>): UseEventBusReturn<T, P>;
|
|
1623
|
+
export declare function useEventBus<T = unknown, P$1 = any>(key: EventBusIdentifier<T>): UseEventBusReturn<T, P$1>;
|
|
1665
1624
|
|
|
1666
|
-
export declare interface UseEventBusReturn<T, P> {
|
|
1625
|
+
export declare interface UseEventBusReturn<T, P$1> {
|
|
1667
1626
|
/**
|
|
1668
1627
|
* Subscribe to an event. When calling emit, the listeners will execute.
|
|
1669
1628
|
* @param listener watch listener.
|
|
1670
1629
|
* @returns a stop function to remove the current callback.
|
|
1671
1630
|
*/
|
|
1672
|
-
on: (listener: EventBusListener<T, P>) => Fn;
|
|
1631
|
+
on: (listener: EventBusListener<T, P$1>) => Fn;
|
|
1673
1632
|
/**
|
|
1674
1633
|
* Similar to `on`, but only fires once
|
|
1675
1634
|
* @param listener watch listener.
|
|
1676
1635
|
* @returns a stop function to remove the current callback.
|
|
1677
1636
|
*/
|
|
1678
|
-
once: (listener: EventBusListener<T, P>) => Fn;
|
|
1637
|
+
once: (listener: EventBusListener<T, P$1>) => Fn;
|
|
1679
1638
|
/**
|
|
1680
1639
|
* Emit an event, the corresponding event listeners will execute.
|
|
1681
1640
|
* @param event data sent.
|
|
1682
1641
|
*/
|
|
1683
|
-
emit: (event?: T, payload?: P) => void;
|
|
1642
|
+
emit: (event?: T, payload?: P$1) => void;
|
|
1684
1643
|
/**
|
|
1685
1644
|
* Remove the corresponding listener.
|
|
1686
1645
|
* @param listener watch listener.
|
|
@@ -1850,7 +1809,7 @@ declare interface UseIdleOptions extends ConfigurableWindow, ConfigurableEventFi
|
|
|
1850
1809
|
initialState?: boolean;
|
|
1851
1810
|
}
|
|
1852
1811
|
|
|
1853
|
-
declare interface UseIdleReturn {
|
|
1812
|
+
declare interface UseIdleReturn extends Stoppable {
|
|
1854
1813
|
idle: ShallowRef<boolean>;
|
|
1855
1814
|
lastActive: ShallowRef<number>;
|
|
1856
1815
|
reset: () => void;
|
|
@@ -2060,7 +2019,7 @@ export declare type UseNowReturn = ReturnType<typeof useNow>;
|
|
|
2060
2019
|
* @see https://vueuse.org/useObjectUrl
|
|
2061
2020
|
* @param object
|
|
2062
2021
|
*/
|
|
2063
|
-
export declare function useObjectUrl(object: MaybeRefOrGetter<Blob | MediaSource | null | undefined>): Readonly<
|
|
2022
|
+
export declare function useObjectUrl(object: MaybeRefOrGetter<Blob | MediaSource | null | undefined>): Readonly<vue0.Ref<string | undefined, string | undefined>>;
|
|
2064
2023
|
|
|
2065
2024
|
export declare function useOffsetPagination(options: Omit<UseOffsetPaginationOptions, 'total'>): UseOffsetPaginationInfinityPageReturn;
|
|
2066
2025
|
|
|
@@ -2142,7 +2101,7 @@ export declare interface UseRefHistoryOptions<Raw, Serialized = Raw> extends Con
|
|
|
2142
2101
|
*
|
|
2143
2102
|
* @default 'pre'
|
|
2144
2103
|
*/
|
|
2145
|
-
flush?:
|
|
2104
|
+
flush?: WatchOptionFlush;
|
|
2146
2105
|
/**
|
|
2147
2106
|
* Maximum number of history to be kept. Default to unlimited.
|
|
2148
2107
|
*/
|
|
@@ -2213,7 +2172,7 @@ export declare interface UseRefHistoryReturn<Raw, Serialized> extends UseManualR
|
|
|
2213
2172
|
* @__NO_SIDE_EFFECTS__
|
|
2214
2173
|
*/
|
|
2215
2174
|
declare function useShare(shareOptions?: MaybeRefOrGetter<UseShareOptions>, options?: ConfigurableNavigator): {
|
|
2216
|
-
isSupported:
|
|
2175
|
+
isSupported: vue0.ComputedRef<boolean>;
|
|
2217
2176
|
share: (overrideOptions?: MaybeRefOrGetter<UseShareOptions>) => Promise<void>;
|
|
2218
2177
|
};
|
|
2219
2178
|
|
|
@@ -2303,8 +2262,8 @@ export declare interface UseStepperReturn<StepName, Steps, Step> {
|
|
|
2303
2262
|
}
|
|
2304
2263
|
|
|
2305
2264
|
declare function useTextareaAutosize(options?: UseTextareaAutosizeOptions): {
|
|
2306
|
-
textarea:
|
|
2307
|
-
input:
|
|
2265
|
+
textarea: vue0.Ref<HTMLTextAreaElement | null | undefined, HTMLTextAreaElement | null | undefined>;
|
|
2266
|
+
input: vue0.Ref<string, string>;
|
|
2308
2267
|
triggerResize: () => void;
|
|
2309
2268
|
};
|
|
2310
2269
|
|
|
@@ -2360,7 +2319,7 @@ export declare type UseThrottledRefHistoryReturn<Raw, Serialized = Raw> = UseRef
|
|
|
2360
2319
|
*
|
|
2361
2320
|
* @__NO_SIDE_EFFECTS__
|
|
2362
2321
|
*/
|
|
2363
|
-
export declare function useThrottleFn<T extends FunctionArgs>(fn: T, ms?: MaybeRefOrGetter<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): PromisifyFn<T>;
|
|
2322
|
+
export declare function useThrottleFn<T$1 extends FunctionArgs>(fn: T$1, ms?: MaybeRefOrGetter<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): PromisifyFn<T$1>;
|
|
2364
2323
|
|
|
2365
2324
|
/**
|
|
2366
2325
|
* Reactive time ago formatter.
|
|
@@ -2510,13 +2469,13 @@ export declare interface UseTimestampOptions<Controls extends boolean> {
|
|
|
2510
2469
|
|
|
2511
2470
|
export declare type UseTimestampReturn = ReturnType<typeof useTimestamp>;
|
|
2512
2471
|
|
|
2513
|
-
export declare function useToggle<Truthy, Falsy, T = Truthy | Falsy>(initialValue: Ref<T>, options?: UseToggleOptions<Truthy, Falsy>): (value?: T) => T;
|
|
2472
|
+
export declare function useToggle<Truthy, Falsy$1, T$1 = Truthy | Falsy$1>(initialValue: Ref<T$1>, options?: UseToggleOptions<Truthy, Falsy$1>): (value?: T$1) => T$1;
|
|
2514
2473
|
|
|
2515
|
-
export declare function useToggle<Truthy = true, Falsy = false, T = Truthy | Falsy>(initialValue?: T, options?: UseToggleOptions<Truthy, Falsy>): [ShallowRef<T>, (value?: T) => T];
|
|
2474
|
+
export declare function useToggle<Truthy = true, Falsy$1 = false, T$1 = Truthy | Falsy$1>(initialValue?: T$1, options?: UseToggleOptions<Truthy, Falsy$1>): [ShallowRef<T$1>, (value?: T$1) => T$1];
|
|
2516
2475
|
|
|
2517
|
-
export declare interface UseToggleOptions<Truthy, Falsy> {
|
|
2476
|
+
export declare interface UseToggleOptions<Truthy, Falsy$1> {
|
|
2518
2477
|
truthyValue?: MaybeRefOrGetter<Truthy>;
|
|
2519
|
-
falsyValue?: MaybeRefOrGetter<Falsy>;
|
|
2478
|
+
falsyValue?: MaybeRefOrGetter<Falsy$1>;
|
|
2520
2479
|
}
|
|
2521
2480
|
|
|
2522
2481
|
/**
|
|
@@ -2736,7 +2695,7 @@ export declare interface UseWebSocketReturn<T> {
|
|
|
2736
2695
|
*/
|
|
2737
2696
|
export declare function useWebWorkerFn<T extends (...fnArgs: any[]) => any>(fn: T, options?: UseWebWorkerOptions): {
|
|
2738
2697
|
workerFn: (...fnArgs: Parameters<T>) => Promise<ReturnType<T>>;
|
|
2739
|
-
workerStatus:
|
|
2698
|
+
workerStatus: vue0.ShallowRef<WebWorkerStatus, WebWorkerStatus>;
|
|
2740
2699
|
workerTerminate: (status?: WebWorkerStatus) => void;
|
|
2741
2700
|
};
|
|
2742
2701
|
|
|
@@ -2771,13 +2730,13 @@ export declare interface UseWebWorkerReturn<Data = any> {
|
|
|
2771
2730
|
*
|
|
2772
2731
|
* @see https://vueuse.org/watchArray
|
|
2773
2732
|
*/
|
|
2774
|
-
export declare function watchArray<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T[]> | T[], cb: WatchArrayCallback<T[], Immediate extends true ? T[] | undefined : T[]>, options?: WatchOptions<Immediate>):
|
|
2733
|
+
export declare function watchArray<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1[]> | T$1[], cb: WatchArrayCallback<T$1[], Immediate extends true ? T$1[] | undefined : T$1[]>, options?: WatchOptions<Immediate>): vue0.WatchHandle;
|
|
2775
2734
|
|
|
2776
|
-
export declare type WatchArrayCallback<V = any, OV = any> = (value: V, oldValue: OV, added: V, removed: OV, onCleanup: (cleanupFn: () => void) => void) => any;
|
|
2735
|
+
export declare type WatchArrayCallback<V$1 = any, OV = any> = (value: V$1, oldValue: OV, added: V$1, removed: OV, onCleanup: (cleanupFn: () => void) => void) => any;
|
|
2777
2736
|
|
|
2778
|
-
export declare function watchAtMost<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options: WatchAtMostOptions<Immediate>): WatchAtMostReturn;
|
|
2737
|
+
export declare function watchAtMost<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options: WatchAtMostOptions<Immediate>): WatchAtMostReturn;
|
|
2779
2738
|
|
|
2780
|
-
export declare function watchAtMost<T, Immediate extends Readonly<boolean> = false>(sources: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options: WatchAtMostOptions<Immediate>): WatchAtMostReturn;
|
|
2739
|
+
export declare function watchAtMost<T$1, Immediate extends Readonly<boolean> = false>(sources: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options: WatchAtMostOptions<Immediate>): WatchAtMostReturn;
|
|
2781
2740
|
|
|
2782
2741
|
export declare interface WatchAtMostOptions<Immediate> extends WatchWithFilterOptions<Immediate> {
|
|
2783
2742
|
count: MaybeRefOrGetter<number>;
|
|
@@ -2785,14 +2744,16 @@ export declare interface WatchAtMostOptions<Immediate> extends WatchWithFilterOp
|
|
|
2785
2744
|
|
|
2786
2745
|
export declare interface WatchAtMostReturn {
|
|
2787
2746
|
stop: WatchStopHandle;
|
|
2747
|
+
pause: () => void;
|
|
2748
|
+
resume: () => void;
|
|
2788
2749
|
count: ShallowRef<number>;
|
|
2789
2750
|
}
|
|
2790
2751
|
|
|
2791
|
-
declare function watchDebounced<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchDebouncedOptions<Immediate>):
|
|
2752
|
+
declare function watchDebounced<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options?: WatchDebouncedOptions<Immediate>): WatchHandle;
|
|
2792
2753
|
|
|
2793
|
-
declare function watchDebounced<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchDebouncedOptions<Immediate>):
|
|
2754
|
+
declare function watchDebounced<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchDebouncedOptions<Immediate>): WatchHandle;
|
|
2794
2755
|
|
|
2795
|
-
declare function watchDebounced<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchDebouncedOptions<Immediate>):
|
|
2756
|
+
declare function watchDebounced<T$1 extends object, Immediate extends Readonly<boolean> = false>(source: T$1, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchDebouncedOptions<Immediate>): WatchHandle;
|
|
2796
2757
|
export { watchDebounced as debouncedWatch }
|
|
2797
2758
|
export { watchDebounced }
|
|
2798
2759
|
|
|
@@ -2800,17 +2761,17 @@ export declare interface WatchDebouncedOptions<Immediate> extends WatchOptions<I
|
|
|
2800
2761
|
debounce?: MaybeRefOrGetter<number>;
|
|
2801
2762
|
}
|
|
2802
2763
|
|
|
2803
|
-
export declare function watchDeep<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(source: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: Omit<WatchOptions<Immediate>, 'deep'>):
|
|
2764
|
+
export declare function watchDeep<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(source: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options?: Omit<WatchOptions<Immediate>, 'deep'>): WatchHandle;
|
|
2804
2765
|
|
|
2805
|
-
export declare function watchDeep<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: Omit<WatchOptions<Immediate>, 'deep'>):
|
|
2766
|
+
export declare function watchDeep<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: Omit<WatchOptions<Immediate>, 'deep'>): WatchHandle;
|
|
2806
2767
|
|
|
2807
|
-
export declare function watchDeep<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: Omit<WatchOptions<Immediate>, 'deep'>):
|
|
2768
|
+
export declare function watchDeep<T$1 extends object, Immediate extends Readonly<boolean> = false>(source: T$1, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: Omit<WatchOptions<Immediate>, 'deep'>): WatchHandle;
|
|
2808
2769
|
|
|
2809
|
-
declare function watchIgnorable<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
2770
|
+
declare function watchIgnorable<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
2810
2771
|
|
|
2811
|
-
declare function watchIgnorable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
2772
|
+
declare function watchIgnorable<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
2812
2773
|
|
|
2813
|
-
declare function watchIgnorable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
2774
|
+
declare function watchIgnorable<T$1 extends object, Immediate extends Readonly<boolean> = false>(source: T$1, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
2814
2775
|
export { watchIgnorable as ignorableWatch }
|
|
2815
2776
|
export { watchIgnorable }
|
|
2816
2777
|
|
|
@@ -2820,23 +2781,28 @@ export declare interface WatchIgnorableReturn {
|
|
|
2820
2781
|
stop: WatchStopHandle;
|
|
2821
2782
|
}
|
|
2822
2783
|
|
|
2823
|
-
export declare function watchImmediate<T extends Readonly<WatchSource<unknown>[]>>(source: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, true>>, options?: Omit<WatchOptions<true>, 'immediate'>):
|
|
2784
|
+
export declare function watchImmediate<T$1 extends Readonly<WatchSource<unknown>[]>>(source: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, true>>, options?: Omit<WatchOptions<true>, 'immediate'>): WatchHandle;
|
|
2824
2785
|
|
|
2825
|
-
export declare function watchImmediate<T>(source: WatchSource<T>, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, 'immediate'>):
|
|
2786
|
+
export declare function watchImmediate<T$1>(source: WatchSource<T$1>, cb: WatchCallback<T$1, T$1 | undefined>, options?: Omit<WatchOptions<true>, 'immediate'>): WatchHandle;
|
|
2826
2787
|
|
|
2827
|
-
export declare function watchImmediate<T extends object>(source: T, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, 'immediate'>):
|
|
2788
|
+
export declare function watchImmediate<T$1 extends object>(source: T$1, cb: WatchCallback<T$1, T$1 | undefined>, options?: Omit<WatchOptions<true>, 'immediate'>): WatchHandle;
|
|
2828
2789
|
|
|
2829
|
-
export declare function watchOnce<T extends Readonly<WatchSource<unknown>[]>>(source: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, true>>, options?: Omit<WatchOptions<true>, 'once'>):
|
|
2790
|
+
export declare function watchOnce<T$1 extends Readonly<WatchSource<unknown>[]>>(source: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, true>>, options?: Omit<WatchOptions<true>, 'once'>): WatchHandle;
|
|
2830
2791
|
|
|
2831
|
-
export declare function watchOnce<T>(source: WatchSource<T>, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, 'once'>):
|
|
2792
|
+
export declare function watchOnce<T$1>(source: WatchSource<T$1>, cb: WatchCallback<T$1, T$1 | undefined>, options?: Omit<WatchOptions<true>, 'once'>): WatchHandle;
|
|
2832
2793
|
|
|
2833
|
-
export declare function watchOnce<T extends object>(source: T, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, 'once'>):
|
|
2794
|
+
export declare function watchOnce<T$1 extends object>(source: T$1, cb: WatchCallback<T$1, T$1 | undefined>, options?: Omit<WatchOptions<true>, 'once'>): WatchHandle;
|
|
2834
2795
|
|
|
2835
|
-
declare
|
|
2796
|
+
declare type WatchOptionFlush = WatchOptions['flush'];
|
|
2836
2797
|
|
|
2837
|
-
|
|
2798
|
+
/**
|
|
2799
|
+
* @deprecated This function will be removed in future version.
|
|
2800
|
+
*/
|
|
2801
|
+
declare function watchPausable<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
2838
2802
|
|
|
2839
|
-
declare function watchPausable<T
|
|
2803
|
+
declare function watchPausable<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
2804
|
+
|
|
2805
|
+
declare function watchPausable<T$1 extends object, Immediate extends Readonly<boolean> = false>(source: T$1, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
2840
2806
|
export { watchPausable as pausableWatch }
|
|
2841
2807
|
export { watchPausable }
|
|
2842
2808
|
|
|
@@ -2846,11 +2812,11 @@ export declare interface WatchPausableReturn extends Pausable {
|
|
|
2846
2812
|
stop: WatchStopHandle;
|
|
2847
2813
|
}
|
|
2848
2814
|
|
|
2849
|
-
declare function watchThrottled<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchThrottledOptions<Immediate>):
|
|
2815
|
+
declare function watchThrottled<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options?: WatchThrottledOptions<Immediate>): WatchHandle;
|
|
2850
2816
|
|
|
2851
|
-
declare function watchThrottled<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchThrottledOptions<Immediate>):
|
|
2817
|
+
declare function watchThrottled<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchThrottledOptions<Immediate>): WatchHandle;
|
|
2852
2818
|
|
|
2853
|
-
declare function watchThrottled<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchThrottledOptions<Immediate>):
|
|
2819
|
+
declare function watchThrottled<T$1 extends object, Immediate extends Readonly<boolean> = false>(source: T$1, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchThrottledOptions<Immediate>): WatchHandle;
|
|
2854
2820
|
export { watchThrottled as throttledWatch }
|
|
2855
2821
|
export { watchThrottled }
|
|
2856
2822
|
|
|
@@ -2860,27 +2826,26 @@ export declare interface WatchThrottledOptions<Immediate> extends WatchOptions<I
|
|
|
2860
2826
|
leading?: boolean;
|
|
2861
2827
|
}
|
|
2862
2828
|
|
|
2863
|
-
export declare function watchTriggerable<T extends Readonly<WatchSource<unknown>[]>, FnReturnT>(sources: [...T], cb: WatchTriggerableCallback<MapSources<T>, MapOldSources<T, true>, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;
|
|
2829
|
+
export declare function watchTriggerable<T$1 extends Readonly<WatchSource<unknown>[]>, FnReturnT>(sources: [...T$1], cb: WatchTriggerableCallback<MapSources<T$1>, MapOldSources<T$1, true>, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;
|
|
2864
2830
|
|
|
2865
|
-
export declare function watchTriggerable<T, FnReturnT>(source: WatchSource<T>, cb: WatchTriggerableCallback<T, T | undefined, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;
|
|
2831
|
+
export declare function watchTriggerable<T$1, FnReturnT>(source: WatchSource<T$1>, cb: WatchTriggerableCallback<T$1, T$1 | undefined, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;
|
|
2866
2832
|
|
|
2867
|
-
export declare function watchTriggerable<T extends object, FnReturnT>(source: T, cb: WatchTriggerableCallback<T, T | undefined, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;
|
|
2833
|
+
export declare function watchTriggerable<T$1 extends object, FnReturnT>(source: T$1, cb: WatchTriggerableCallback<T$1, T$1 | undefined, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;
|
|
2868
2834
|
|
|
2869
|
-
export declare type WatchTriggerableCallback<V = any, OV = any, R = void> = (value: V, oldValue: OV, onCleanup: OnCleanup) => R;
|
|
2835
|
+
export declare type WatchTriggerableCallback<V$1 = any, OV = any, R$1 = void> = (value: V$1, oldValue: OV, onCleanup: OnCleanup) => R$1;
|
|
2870
2836
|
|
|
2871
2837
|
export declare interface WatchTriggerableReturn<FnReturnT = void> extends WatchIgnorableReturn {
|
|
2872
2838
|
/** Execute `WatchCallback` immediately */
|
|
2873
2839
|
trigger: () => FnReturnT;
|
|
2874
2840
|
}
|
|
2875
2841
|
|
|
2876
|
-
export declare function watchWithFilter<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>):
|
|
2842
|
+
export declare function watchWithFilter<T$1 extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T$1], cb: WatchCallback<MapSources<T$1>, MapOldSources<T$1, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchHandle;
|
|
2877
2843
|
|
|
2878
|
-
export declare function watchWithFilter<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>):
|
|
2844
|
+
export declare function watchWithFilter<T$1, Immediate extends Readonly<boolean> = false>(source: WatchSource<T$1>, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchWithFilterOptions<Immediate>): WatchHandle;
|
|
2879
2845
|
|
|
2880
|
-
export declare function watchWithFilter<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>):
|
|
2846
|
+
export declare function watchWithFilter<T$1 extends object, Immediate extends Readonly<boolean> = false>(source: T$1, cb: WatchCallback<T$1, Immediate extends true ? T$1 | undefined : T$1>, options?: WatchWithFilterOptions<Immediate>): WatchHandle;
|
|
2881
2847
|
|
|
2882
|
-
declare interface WatchWithFilterOptions<Immediate> extends WatchOptions<Immediate>, ConfigurableEventFilter {
|
|
2883
|
-
}
|
|
2848
|
+
declare interface WatchWithFilterOptions<Immediate> extends WatchOptions<Immediate>, ConfigurableEventFilter {}
|
|
2884
2849
|
|
|
2885
2850
|
declare type WebSocketHeartbeatMessage = string | ArrayBuffer | Blob;
|
|
2886
2851
|
|
|
@@ -2893,7 +2858,7 @@ export declare type WebWorkerStatus = 'PENDING' | 'SUCCESS' | 'RUNNING' | 'ERROR
|
|
|
2893
2858
|
*
|
|
2894
2859
|
* @see https://vueuse.org/whenever
|
|
2895
2860
|
*/
|
|
2896
|
-
export declare function whenever<T>(source: WatchSource<T | false | null | undefined>, cb: WatchCallback<T>, options?: WheneverOptions):
|
|
2861
|
+
export declare function whenever<T$1>(source: WatchSource<T$1 | false | null | undefined>, cb: WatchCallback<T$1>, options?: WheneverOptions): vue0.WatchHandle;
|
|
2897
2862
|
|
|
2898
2863
|
export declare interface WheneverOptions extends WatchOptions {
|
|
2899
2864
|
/**
|
|
@@ -2908,17 +2873,16 @@ export declare interface WheneverOptions extends WatchOptions {
|
|
|
2908
2873
|
|
|
2909
2874
|
declare type WindowEventName = keyof WindowEventMap;
|
|
2910
2875
|
|
|
2911
|
-
export declare interface WritableComputedInjectOptions<T, K> {
|
|
2912
|
-
get: ComputedInjectGetter<T, K>;
|
|
2913
|
-
set: ComputedInjectSetter<K>;
|
|
2876
|
+
export declare interface WritableComputedInjectOptions<T, K$1> {
|
|
2877
|
+
get: ComputedInjectGetter<T, K$1>;
|
|
2878
|
+
set: ComputedInjectSetter<K$1>;
|
|
2914
2879
|
}
|
|
2915
2880
|
|
|
2916
|
-
export declare interface WritableComputedInjectOptionsWithDefault<T, K> {
|
|
2917
|
-
get: ComputedInjectGetterWithDefault<T, K>;
|
|
2918
|
-
set: ComputedInjectSetter<K>;
|
|
2881
|
+
export declare interface WritableComputedInjectOptionsWithDefault<T, K$1> {
|
|
2882
|
+
get: ComputedInjectGetterWithDefault<T, K$1>;
|
|
2883
|
+
set: ComputedInjectSetter<K$1>;
|
|
2919
2884
|
}
|
|
2920
2885
|
|
|
2921
|
-
export declare interface WritableComputedRefWithControl<T> extends WritableComputedRef<T>, ComputedWithControlRefExtra {
|
|
2922
|
-
}
|
|
2886
|
+
export declare interface WritableComputedRefWithControl<T$1> extends WritableComputedRef<T$1>, ComputedWithControlRefExtra {}
|
|
2923
2887
|
|
|
2924
2888
|
export { }
|