8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad9f897 commit 842d7c9Copy full SHA for 842d7c9
packages/shared/makeDestructurable/index.md
@@ -20,8 +20,8 @@ const foo = { name: 'foo' }
20
const bar = 1024
21
22
const obj = makeDestructurable(
23
- { foo, bar },
24
- [foo, bar],
+ { foo, bar } as const,
+ [foo, bar] as const,
25
)
26
```
27
packages/shared/makeDestructurable/index.ts
@@ -1,6 +1,6 @@
1
export function makeDestructurable<
2
T extends Record<string, unknown>,
3
- const A extends readonly any[],
+ A extends readonly any[],
4
>(obj: T, arr: A): T & A {
5
if (typeof Symbol !== 'undefined') {
6
const clone = { ...obj }
0 commit comments