fix: use named symbols everywhere (#18238)

This isn't _really_ a fix since these should never surface to the user,
but it's useful for debugging when they do, as in
https://github.com/sveltejs/kit/pull/15779. Instead of seeing `Symbol()`
we see e.g. `Symbol(uninitialized)` which makes it easier to understand
where a bug is coming from.
pull/18239/head
Rich Harris 2 weeks ago committed by GitHub
parent dc1f037fa6
commit 2bc3592eb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: use named symbols everywhere

@ -32,7 +32,7 @@ export const ELEMENT_IS_NAMESPACED = 1;
export const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
export const ELEMENT_IS_INPUT = 1 << 2;
export const UNINITIALIZED = Symbol();
export const UNINITIALIZED = Symbol('uninitialized');
// Dev-time component properties
export const FILENAME = Symbol('filename');

@ -21,7 +21,7 @@ export let legacy_is_updating_store = false;
*/
let is_store_binding = false;
let IS_UNMOUNTED = Symbol();
let IS_UNMOUNTED = Symbol('unmounted');
/**
* Gets the current value of a store. If the store isn't subscribed to yet, it will create a proxy

@ -4,7 +4,7 @@ import { tag } from '../internal/client/dev/tracing.js';
import { get } from '../internal/client/runtime.js';
import { get_current_url } from './url.js';
export const REPLACE = Symbol();
export const REPLACE = Symbol('replace');
/**
* A reactive version of the built-in [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object.

Loading…
Cancel
Save