Skip to content

Commit a9f2d6f

Browse files
committed
tidy up
1 parent 22cf914 commit a9f2d6f

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

packages/svelte/src/compiler/phases/3-transform/client/transform-template/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* @import { ComponentContext, TemplateOperations, ComponentClientTransformState } from "../types.js"
2+
* @import { ComponentContext, ComponentClientTransformState } from "../types.js"
33
* @import { Identifier, Expression } from "estree"
4-
* @import { AST, Namespace } from '#compiler'
4+
* @import { Namespace } from '#compiler'
55
* @import { SourceLocation } from '#shared'
66
*/
77
import { dev } from '../../../../state.js';

packages/svelte/src/compiler/phases/3-transform/client/transform-template/to-functions.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
/**
2-
* @import { TemplateOperations } from "../types.js"
3-
* @import { ObjectExpression, Identifier, ArrayExpression, Property, Expression, Literal } from "estree"
4-
*/
1+
/** @import { TemplateOperation } from '../types.js' */
2+
/** @import { ObjectExpression, Identifier, ArrayExpression, Property, Expression, Literal } from 'estree' */
53
import * as b from '../../../../utils/builders.js';
64
import { regex_is_valid_identifier } from '../../../patterns.js';
75
import fix_attribute_casing from './fix-attribute-casing.js';
86

97
/**
10-
* @param {TemplateOperations} items
8+
* @param {TemplateOperation[]} items
119
*/
1210
export function template_to_functions(items) {
1311
let elements = b.array([]);

packages/svelte/src/compiler/phases/3-transform/client/transform-template/to-string.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
/**
2-
* @import { TemplateOperations } from "../types.js"
3-
*/
1+
/** @import { TemplateOperation } from '../types.js' */
42
import { escape_html } from '../../../../../escaping.js';
53
import { is_void } from '../../../../../utils.js';
64

75
/**
8-
* @param {TemplateOperations} items
6+
* @param {TemplateOperation[]} items
97
*/
108
export function template_to_string(items) {
119
/**

packages/svelte/src/compiler/phases/3-transform/client/types.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface ClientTransformState extends TransformState {
3636
>;
3737
}
3838

39-
type TemplateOperations = Array<
39+
type TemplateOperation =
4040
| {
4141
kind: 'create_element';
4242
name: string;
@@ -59,8 +59,7 @@ type TemplateOperations = Array<
5959
}
6060
| {
6161
kind: 'pop_element';
62-
}
63-
>;
62+
};
6463

6564
export interface ComponentClientTransformState extends ClientTransformState {
6665
readonly analysis: ComponentAnalysis;
@@ -79,7 +78,7 @@ export interface ComponentClientTransformState extends ClientTransformState {
7978
/** Expressions used inside the render effect */
8079
readonly expressions: Expression[];
8180
/** The HTML template string */
82-
readonly template: TemplateOperations;
81+
readonly template: TemplateOperation[];
8382
readonly locations: SourceLocation[];
8483
readonly metadata: {
8584
namespace: Namespace;

0 commit comments

Comments
 (0)