8000 fix(makeDestructurable): fix Typescript < 5.0.0 support (#4028) · vueuse/vueuse@842d7c9 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 842d7c9

Browse files
authored
fix(makeDestructurable): fix Typescript < 5.0.0 support (#4028)
1 parent ad9f897 commit 842d7c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/shared/makeDestructurable/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const foo = { name: 'foo' }
2020
const bar = 1024
2121

2222
const obj = makeDestructurable(
23-
{ foo, bar },
24-
[foo, bar],
23+
{ foo, bar } as const,
24+
[foo, bar] as const,
2525
)
2626
```
2727

packages/shared/makeDestructurable/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function makeDestructurable<
22
T extends Record<string, unknown>,
3-
const A extends readonly any[],
3+
A extends readonly any[],
44
>(obj: T, arr: A): T & A {
55
if (typeof Symbol !== 'undefined') {
66
const clone = { ...obj }

0 commit comments

Comments
 (0)
0