Skip to content

Commit 0cac3d2

Browse files
committed
tweak
1 parent d31831b commit 0cac3d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/svelte/src/utils.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ const RUNES = /** @type {const} */ ([
458458
* @returns {name is RuneName}
459459
*/
460460
export function is_rune(name) {
461-
return RUNES.includes(/** @type {RUNES[number]} */ (name));
461+
return RUNES.includes(/** @type {RuneName} */ (name));
462462
}
463463

464464
/** @typedef {STATE_CREATION_RUNES[number]} StateCreationRuneName */
@@ -468,9 +468,7 @@ export function is_rune(name) {
468468
* @returns {name is StateCreationRuneName}
469469
*/
470470
export function is_state_creation_rune(name) {
471-
return (
472-
name === '$state' || name === '$state.raw' || name === '$derived' || name === '$derived.by'
473-
);
471+
return STATE_CREATION_RUNES.includes(/** @type {StateCreationRuneName} */ (name));
474472
}
475473

476474
/** List of elements that require raw contents and should not have SSR comments put in them */

0 commit comments

Comments
 (0)