Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/svelte2tsx/src/htmlxtojsx/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Node } from 'estree-walker';
import MagicString from 'magic-string';
import svelte from 'svelte/compiler';
import { parseHtmlx } from '../htmlxparser';
import { parseHtmlx } from '../utils/htmlxparser';
import { handleActionDirective } from './nodes/action-directive';
import { handleAnimateDirective } from './nodes/animation-directive';
import { handleAttribute } from './nodes/attribute';
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte2tsx/src/htmlxtojsx/nodes/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import MagicString from 'magic-string';
import { Node } from 'estree-walker';
import { getSlotName } from '../../utils/svelteAst';
import { beforeStart } from '../utils/node-utils';
import { getSingleSlotDef } from '../../nodes/slot';
import { getSingleSlotDef } from '../../svelte2tsx/nodes/slot';

/**
* Handle `<svelte:self>` and slot-specific transformations.
Expand Down
37 changes: 0 additions & 37 deletions packages/svelte2tsx/src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
import MagicString from 'magic-string';
import { Node } from 'estree-walker';
import { ArrayPattern, ObjectPattern, Identifier } from 'estree';
import { ExportedNames } from './nodes/ExportedNames';
import { ComponentEvents } from './nodes/ComponentEvents';

export interface InstanceScriptProcessResult {
exportedNames: ExportedNames;
events: ComponentEvents;
uses$$props: boolean;
uses$$restProps: boolean;
uses$$slots: boolean;
getters: Set<string>;
}

export interface CreateRenderFunctionPara extends InstanceScriptProcessResult {
str: MagicString;
scriptTag: Node;
scriptDestination: number;
slots: Map<string, Map<string, string>>;
events: ComponentEvents;
isTsFile: boolean;
}

export interface NodeRange {
start: number;
Expand Down Expand Up @@ -54,19 +33,3 @@ export interface BaseDirective extends Node {
name: string;
modifiers: string[];
}

export interface AddComponentExportPara {
str: MagicString;
uses$$propsOr$$restProps: boolean;
strictMode: boolean;
/**
* If true, not fallback to `CustomEvent<any>`
* -> all unknown events will throw a type error
* */
strictEvents: boolean;
isTsFile: boolean;
getters: Set<string>;
/** A named export allows for TSDoc-compatible docstrings */
className?: string;
componentDocumentation?: string | null;
}
Loading