Skip to content

Commit c965abc

Browse files
thollanderConduitry
authored andcommitted
Use the already defined type for AppendTarget
1 parent 831926b commit c965abc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/compile/render-ssr/Renderer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Slot from './handlers/Slot';
1111
import Tag from './handlers/Tag';
1212
import Text from './handlers/Text';
1313
import Title from './handlers/Title';
14-
import { CompileOptions } from '../../interfaces';
14+
import { AppendTarget, CompileOptions } from '../../interfaces';
1515

1616
type Handler = (node: any, renderer: Renderer, options: CompileOptions) => void;
1717

@@ -36,8 +36,6 @@ const handlers: Record<string, Handler> = {
3636
Window: noop
3737
};
3838

39-
type AppendTarget = any; // TODO
40-
4139
export default class Renderer {
4240
has_bindings = false;
4341
code = '';

src/compile/render-ssr/handlers/InlineComponent.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { snip } from '../../utils/snip';
44
import Renderer from '../Renderer';
55
import { stringify_props } from '../../utils/stringify_props';
66
import { get_slot_scope } from './shared/get_slot_scope';
7-
8-
type AppendTarget = any; // TODO
7+
import { AppendTarget } from '../../../interfaces';
98

109
function stringify_attribute(chunk: Node) {
1110
if (chunk.type === 'Text') {
@@ -111,4 +110,4 @@ export default function(node, renderer: Renderer, options) {
111110
const slots = stringify_props(slot_fns);
112111

113112
renderer.append(`\${@validate_component(${expression}, '${node.name}').$$render($$result, ${props}, ${bindings}, ${slots})}`);
114-
}
113+
}

0 commit comments

Comments
 (0)