Skip to content

Commit 9fbb9d3

Browse files
committed
chore: fix build
1 parent 0ef6333 commit 9fbb9d3

File tree

5 files changed

+54
-22
lines changed

5 files changed

+54
-22
lines changed

docs/api/vue-composable.api.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,6 @@ export interface LocalStorageReturn<T> {
531531
supported: boolean;
532532
}
533533

534-
// @public (undocumented)
535-
export type LocalStorageTyped<T extends object> = string;
536-
537534
// @public (undocumented)
538535
export const MAX_ARRAY_SIZE: number;
539536

@@ -1326,8 +1323,8 @@ export function useLocalStorage(
13261323
): LocalStorageReturn<string>;
13271324

13281325
// @public (undocumented)
1329-
export function useLocalStorage<T extends object = any>(
1330-
key: LocalStorageTyped<T> | string,
1326+
export function useLocalStorage<T>(
1327+
key: string,
13311328
defaultValue?: RefTyped<T>,
13321329
sync?: boolean
13331330
): LocalStorageReturn<T>;
@@ -1382,6 +1379,19 @@ export function useOnMouseMove(
13821379
// @public (undocumented)
13831380
export function useOnMouseMove(el: RefElement, wait: number): MouseMoveResult;
13841381

1382+
// @public (undocumented)
1383+
export function useOnMouseMove<T extends Element>(
1384+
el: Ref<T> | Ref<T | null>,
1385+
options?: boolean | AddEventListenerOptions,
1386+
wait?: number
1387+
): MouseMoveResult;
1388+
1389+
// @public (undocumented)
1390+
export function useOnMouseMove<T extends Element>(
1391+
el: Ref<T | null>,
1392+
wait: number
1393+
): MouseMoveResult;
1394+
13851395
// @public (undocumented)
13861396
export function useOnMouseMove(
13871397
el: RefElement,
@@ -1409,6 +1419,19 @@ export function useOnResize(
14091419
wait?: number
14101420
): ResizeResult;
14111421

1422+
// @public (undocumented)
1423+
export function useOnResize<T extends Element>(
1424+
el: Ref<T> | Ref<T | null>,
1425+
options?: boolean | AddEventListenerOptions,
1426+
wait?: number
1427+
): ResizeResult;
1428+
1429+
// @public (undocumented)
1430+
export function useOnResize<T extends Element>(
1431+
el: Ref<T | null>,
1432+
wait: number
1433+
): ResizeResult;
1434+
14121435
// @public (undocumented)
14131436
export function useOnScroll(): ScrollResult;
14141437

@@ -1441,6 +1464,19 @@ export function useOnScroll(
14411464
wait?: number
14421465
): ScrollResult;
14431466

1467+
// @public (undocumented)
1468+
export function useOnScroll<T extends Element>(
1469+
el: Ref<T> | Ref<T | null>,
1470+
options?: boolean | AddEventListenerOptions,
1471+
wait?: number
1472+
): ScrollResult;
1473+
1474+
// @public (undocumented)
1475+
export function useOnScroll<T extends Element>(
1476+
el: Ref<T | null>,
1477+
wait: number
1478+
): ScrollResult;
1479+
14441480
// @public (undocumented)
14451481
export function usePageVisibility(): {
14461482
visibility: Ref<VisibilityState>;
@@ -1607,8 +1643,8 @@ export function useSessionStorage(
16071643
): LocalStorageReturn<string>;
16081644

16091645
// @public (undocumented)
1610-
export function useSessionStorage<T extends object = object>(
1611-
key: LocalStorageTyped<T> | string,
1646+
export function useSessionStorage<T>(
1647+
key: string,
16121648
defaultValue?: RefTyped<T>,
16131649
sync?: boolean
16141650
): LocalStorageReturn<T>;
@@ -1636,8 +1672,8 @@ export function useStorage(
16361672
): LocalStorageReturn<string>;
16371673

16381674
// @public (undocumented)
1639-
export function useStorage<T extends object = any>(
1640-
key: LocalStorageTyped<T> | string,
1675+
export function useStorage<T>(
1676+
key: string,
16411677
defaultValue?: RefTyped<T>,
16421678
sync?: boolean
16431679
): LocalStorageReturn<T>;

docs/composable/storage/localStorage.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import { useLocalStorage } from "vue-composable";
1010
const localStorage = useLocalStorage(key, defaultValue?, sync?);
1111
```
1212
13-
| Parameters | Type | Required | Default | Description |
14-
| ------------ | ----------------------------- | -------- | ----------- | --------------------------------------------------- |
15-
| key | `string|LocalStorageTyped<T>` | `true` | | Key that will be used to store in localStorage |
16-
| defaultValue | `object` | `false` | `undefined` | default value stored in the localStorage |
17-
| sync | `Boolean` | `false` | `true` | sets the storage to sync automatically between tabs |
13+
| Parameters | Type | Required | Default | Description |
14+
| ------------ | --------- | -------- | ----------- | --------------------------------------------------- |
15+
| key | `string` | `true` | | Key that will be used to store in localStorage |
16+
| defaultValue | `object` | `false` | `undefined` | default value stored in the localStorage |
17+
| sync | `Boolean` | `false` | `true` | sets the storage to sync automatically between tabs |
1818
1919
## State
2020

packages/axios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
"@vue/runtime-core": "^3.0.0-beta.14",
5959
"typescript": "^3.9.5"
6060
}
61-
}
61+
}

packages/vue-composable/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@
4646
"@vue/composition-api": "^0.6.2",
4747
"vue": "^2.6.10"
4848
}
49-
}
49+
}

packages/vue-composable/src/storage/storage.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
LocalStorageTyped,
3-
LocalStorageReturn,
4-
useLocalStorage
5-
} from "./localStorage";
1+
import { LocalStorageReturn, useLocalStorage } from "./localStorage";
62
import { RefTyped } from "../utils";
73
import { useSessionStorage } from "./sessionStorage";
84
import { useWebStorage } from "./webStorage";
@@ -15,7 +11,7 @@ export function useStorage(
1511
sync?: boolean
1612
): LocalStorageReturn<string>;
1713
export function useStorage<T>(
18-
key: LocalStorageTyped<T> | string,
14+
key: string,
1915
defaultValue?: RefTyped<T>,
2016
sync?: boolean
2117
): LocalStorageReturn<T>;

0 commit comments

Comments
 (0)