File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ function parseAsSvelte(
259259 styleSelectorNodeLoc,
260260 svelteParseContext : {
261261 ...svelteParseContext ,
262+ // The compiler decides if runes mode is used after parsing.
262263 runes : svelteParseContext . runes ?? hasRunesSymbol ( resultScript . ast ) ,
263264 } ,
264265 } ) ;
Original file line number Diff line number Diff line change @@ -19,9 +19,14 @@ const runeSymbols: string[] = [
1919/** The context for parsing. */
2020export type SvelteParseContext = {
2121 /**
22- * Whether to use Runes mode.
23- * May be `true` if the user is using Svelte v5.
24- * Resolved from `svelte.config.js` or `parserOptions`, but may be overridden by `<svelte:options>`.
22+ * Determines if the file is in Runes mode.
23+ *
24+ * - Svelte 3/4 does not support Runes mode.
25+ * - Checks if `runes` configuration exists in:
26+ * - `parserOptions`
27+ * - `svelte.config.js`
28+ * - `<svelte:options>` in the Svelte file.
29+ * - Returns `true` if the `runes` symbol is present in the Svelte file.
2530 */
2631 runes ?: boolean ;
2732 /** The version of "svelte/compiler". */
You can’t perform that action at this time.
0 commit comments