Use the already defined type for AppendTarget

pull/2604/head
thollander 5 years ago committed by Conduitry
parent 831926bccd
commit c965abc884

@ -11,7 +11,7 @@ import Slot from './handlers/Slot';
import Tag from './handlers/Tag';
import Text from './handlers/Text';
import Title from './handlers/Title';
import { CompileOptions } from '../../interfaces';
import { AppendTarget, CompileOptions } from '../../interfaces';
type Handler = (node: any, renderer: Renderer, options: CompileOptions) => void;
@ -36,8 +36,6 @@ const handlers: Record<string, Handler> = {
Window: noop
};
type AppendTarget = any; // TODO
export default class Renderer {
has_bindings = false;
code = '';

@ -4,8 +4,7 @@ import { snip } from '../../utils/snip';
import Renderer from '../Renderer';
import { stringify_props } from '../../utils/stringify_props';
import { get_slot_scope } from './shared/get_slot_scope';
type AppendTarget = any; // TODO
import { AppendTarget } from '../../../interfaces';
function stringify_attribute(chunk: Node) {
if (chunk.type === 'Text') {
@ -111,4 +110,4 @@ export default function(node, renderer: Renderer, options) {
const slots = stringify_props(slot_fns);
renderer.append(`\${@validate_component(${expression}, '${node.name}').$$render($$result, ${props}, ${bindings}, ${slots})}`);
}
}

Loading…
Cancel
Save