Skip to content

Commit b4bb104

Browse files
Sync svelte docs (#1689)
sync svelte docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 24de0b3 commit b4bb104

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-compiler.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ namespace AST {
341341
}
342342
343343
/** An `animate:` directive */
344-
export interface AnimateDirective extends BaseNode {
344+
export interface AnimateDirective extends BaseAttribute {
345345
type: 'AnimateDirective';
346346
/** The 'x' in `animate:x` */
347347
name: string;
@@ -350,7 +350,7 @@ namespace AST {
350350
}
351351
352352
/** A `bind:` directive */
353-
export interface BindDirective extends BaseNode {
353+
export interface BindDirective extends BaseAttribute {
354354
type: 'BindDirective';
355355
/** The 'x' in `bind:x` */
356356
name: string;
@@ -362,7 +362,7 @@ namespace AST {
362362
}
363363
364364
/** A `class:` directive */
365-
export interface ClassDirective extends BaseNode {
365+
export interface ClassDirective extends BaseAttribute {
366366
type: 'ClassDirective';
367367
/** The 'x' in `class:x` */
368368
name: 'class';
@@ -371,7 +371,7 @@ namespace AST {
371371
}
372372
373373
/** A `let:` directive */
374-
export interface LetDirective extends BaseNode {
374+
export interface LetDirective extends BaseAttribute {
375375
type: 'LetDirective';
376376
/** The 'x' in `let:x` */
377377
name: string;
@@ -384,7 +384,7 @@ namespace AST {
384384
}
385385
386386
/** An `on:` directive */
387-
export interface OnDirective extends BaseNode {
387+
export interface OnDirective extends BaseAttribute {
388388
type: 'OnDirective';
389389
/** The 'x' in `on:x` */
390390
name: string;
@@ -404,7 +404,7 @@ namespace AST {
404404
}
405405
406406
/** A `style:` directive */
407-
export interface StyleDirective extends BaseNode {
407+
export interface StyleDirective extends BaseAttribute {
408408
type: 'StyleDirective';
409409
/** The 'x' in `style:x` */
410410
name: string;
@@ -418,7 +418,8 @@ namespace AST {
418418
419419
// TODO have separate in/out/transition directives
420420
/** A `transition:`, `in:` or `out:` directive */
421-
export interface TransitionDirective extends BaseNode {
421+
export interface TransitionDirective
422+
extends BaseAttribute {
422423
type: 'TransitionDirective';
423424
/** The 'x' in `transition:x` */
424425
name: string;
@@ -432,7 +433,7 @@ namespace AST {
432433
}
433434
434435
/** A `use:` directive */
435-
export interface UseDirective extends BaseNode {
436+
export interface UseDirective extends BaseAttribute {
436437
type: 'UseDirective';
437438
/** The 'x' in `use:x` */
438439
name: string;
@@ -442,6 +443,7 @@ namespace AST {
442443
443444
export interface BaseElement extends BaseNode {
444445
name: string;
446+
name_loc: SourceLocation;
445447
attributes: Array<
446448
Attribute | SpreadAttribute | Directive | AttachTag
447449
>;
@@ -568,9 +570,13 @@ namespace AST {
568570
body: Fragment;
569571
}
570572
571-
export interface Attribute extends BaseNode {
572-
type: 'Attribute';
573+
export interface BaseAttribute extends BaseNode {
573574
name: string;
575+
name_loc: SourceLocation | null;
576+
}
577+
578+
export interface Attribute extends BaseAttribute {
579+
type: 'Attribute';
574580
/**
575581
* Quoted/string values are represented by an array, even if they contain a single expression like `"{x}"`
576582
*/

0 commit comments

Comments
 (0)