Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ namespace AST {
}

/** An `animate:` directive */
export interface AnimateDirective extends BaseNode {
export interface AnimateDirective extends BaseAttribute {
type: 'AnimateDirective';
/** The 'x' in `animate:x` */
name: string;
Expand All @@ -350,7 +350,7 @@ namespace AST {
}

/** A `bind:` directive */
export interface BindDirective extends BaseNode {
export interface BindDirective extends BaseAttribute {
type: 'BindDirective';
/** The 'x' in `bind:x` */
name: string;
Expand All @@ -362,7 +362,7 @@ namespace AST {
}

/** A `class:` directive */
export interface ClassDirective extends BaseNode {
export interface ClassDirective extends BaseAttribute {
type: 'ClassDirective';
/** The 'x' in `class:x` */
name: 'class';
Expand All @@ -371,7 +371,7 @@ namespace AST {
}

/** A `let:` directive */
export interface LetDirective extends BaseNode {
export interface LetDirective extends BaseAttribute {
type: 'LetDirective';
/** The 'x' in `let:x` */
name: string;
Expand All @@ -384,7 +384,7 @@ namespace AST {
}

/** An `on:` directive */
export interface OnDirective extends BaseNode {
export interface OnDirective extends BaseAttribute {
type: 'OnDirective';
/** The 'x' in `on:x` */
name: string;
Expand All @@ -404,7 +404,7 @@ namespace AST {
}

/** A `style:` directive */
export interface StyleDirective extends BaseNode {
export interface StyleDirective extends BaseAttribute {
type: 'StyleDirective';
/** The 'x' in `style:x` */
name: string;
Expand All @@ -418,7 +418,8 @@ namespace AST {

// TODO have separate in/out/transition directives
/** A `transition:`, `in:` or `out:` directive */
export interface TransitionDirective extends BaseNode {
export interface TransitionDirective
extends BaseAttribute {
type: 'TransitionDirective';
/** The 'x' in `transition:x` */
name: string;
Expand All @@ -432,7 +433,7 @@ namespace AST {
}

/** A `use:` directive */
export interface UseDirective extends BaseNode {
export interface UseDirective extends BaseAttribute {
type: 'UseDirective';
/** The 'x' in `use:x` */
name: string;
Expand All @@ -442,6 +443,7 @@ namespace AST {

export interface BaseElement extends BaseNode {
name: string;
name_loc: SourceLocation;
attributes: Array<
Attribute | SpreadAttribute | Directive | AttachTag
>;
Expand Down Expand Up @@ -568,9 +570,13 @@ namespace AST {
body: Fragment;
}

export interface Attribute extends BaseNode {
type: 'Attribute';
export interface BaseAttribute extends BaseNode {
name: string;
name_loc: SourceLocation | null;
}

export interface Attribute extends BaseAttribute {
type: 'Attribute';
/**
* Quoted/string values are represented by an array, even if they contain a single expression like `"{x}"`
*/
Expand Down