File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ function parseAsSvelte(
259
259
styleSelectorNodeLoc,
260
260
svelteParseContext : {
261
261
...svelteParseContext ,
262
+ // The compiler decides if runes mode is used after parsing.
262
263
runes : svelteParseContext . runes ?? hasRunesSymbol ( resultScript . ast ) ,
263
264
} ,
264
265
} ) ;
Original file line number Diff line number Diff line change @@ -19,9 +19,14 @@ const runeSymbols: string[] = [
19
19
/** The context for parsing. */
20
20
export type SvelteParseContext = {
21
21
/**
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.
25
30
*/
26
31
runes ?: boolean ;
27
32
/** The version of "svelte/compiler". */
You can’t perform that action at this time.
0 commit comments