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.
as const
1 parent 2a77ff3 commit 4ea131aCopy full SHA for 4ea131a
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 } as const,
24
- [foo, bar] as const,
+ { foo, bar },
+ [foo, bar],
25
)
26
```
27
packages/shared/makeDestructurable/index.ts
@@ -1,6 +1,6 @@
1
export function makeDestructurable<
2
T extends Record<string, unknown>,
3
- A extends readonly any[],
+ const A extends readonly any[],
4
>(obj: T, arr: A): T & A {
5
if (typeof Symbol !== 'undefined') {
6
const clone = { ...obj }
0 commit comments