Skip to content

Commit 0fda425

Browse files
committed
remove property in prod
1 parent 96e3fb6 commit 0fda425

File tree

1 file changed

+4
-4
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+4
-4
lines changed

packages/svelte/src/internal/client/reactivity/props.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function update_pre_prop(fn, d = 1) {
3636
/**
3737
* The proxy handler for rest props (i.e. `const { x, ...rest } = $props()`).
3838
* Is passed the full `$$props` object and excludes the named props.
39-
* @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name: string }>}}
39+
* @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name?: string }>}}
4040
*/
4141
const rest_props_handler = {
4242
get(target, key) {
@@ -71,12 +71,12 @@ const rest_props_handler = {
7171

7272
/**
7373
* @param {Record<string, unknown>} props
74-
* @param {string[]} rest
74+
* @param {string[]} exclude
7575
* @param {string} [name]
7676
* @returns {Record<string, unknown>}
7777
*/
78-
export function rest_props(props, rest, name) {
79-
return new Proxy({ props, exclude: rest, name }, rest_props_handler);
78+
export function rest_props(props, exclude, name) {
79+
return new Proxy(DEV ? { props, exclude, name } : { props, exclude }, rest_props_handler);
8080
}
8181

8282
/**

0 commit comments

Comments
 (0)