-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a6ffe7
commit def666f
Showing
9 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
packages/svelte2tsx/test/htmlx2jsx/samples/editing-empty-expression.v5/expected.error.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"code": "js_parse_error", | ||
"message": "Unexpected token\nhttps://svelte.dev/e/js_parse_error", | ||
"filename": "(unknown)", | ||
"start": { | ||
"line": 1, | ||
"column": 6, | ||
"character": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 6, | ||
"character": 6 | ||
}, | ||
"position": [ | ||
6, | ||
6 | ||
], | ||
"frame": "1: <div>{}</div>\n ^\n2: \n3: <div attr={}></div>" | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/svelte2tsx/test/htmlx2jsx/samples/editing-empty-expression.v5/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ svelteHTML.createElement("div", {});; } | ||
|
||
{ svelteHTML.createElement("div", {"attr": ,}); } | ||
{ svelteHTML.createElement("div", { ,}); } | ||
|
||
{ const $$_tnenopmoC0C = __sveltets_2_ensureComponent(Component); new $$_tnenopmoC0C({ target: __sveltets_2_any(), props: {"prop": ,}}); Component} | ||
{ const $$_tnenopmoC0C = __sveltets_2_ensureComponent(Component); new $$_tnenopmoC0C({ target: __sveltets_2_any(), props: { ,}}); Component} |
7 changes: 7 additions & 0 deletions
7
packages/svelte2tsx/test/htmlx2jsx/samples/editing-empty-expression.v5/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div>{}</div> | ||
|
||
<div attr={}></div> | ||
<div {}></div> | ||
|
||
<Component prop={}></Component> | ||
<Component {}></Component> |
20 changes: 20 additions & 0 deletions
20
packages/svelte2tsx/test/htmlx2jsx/samples/editing-unclosed-block.v5/expected.error.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"code": "element_invalid_closing_tag", | ||
"message": "`</div>` attempted to close an element that was not open\nhttps://svelte.dev/e/element_invalid_closing_tag", | ||
"filename": "(unknown)", | ||
"start": { | ||
"line": 3, | ||
"column": 0, | ||
"character": 20 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 0, | ||
"character": 20 | ||
}, | ||
"position": [ | ||
20, | ||
20 | ||
], | ||
"frame": "1: <div>\n2: {#if foo}\n3: </div>\n ^\n4: \n5: <div>" | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/svelte2tsx/test/htmlx2jsx/samples/editing-unclosed-block.v5/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ svelteHTML.createElement("div", {}); | ||
if(foo){ | ||
} } | ||
|
||
{ svelteHTML.createElement("div", {}); | ||
for(let item of __sveltets_2_ensureArray(array)){ | ||
if(i){ | ||
}} } | ||
|
||
{ const $$_tnenopmoC0C = __sveltets_2_ensureComponent(Component); const $$_tnenopmoC0 = new $$_tnenopmoC0C({ target: __sveltets_2_any(), props: {f:() => { async ()/*Ωignore_positionΩ*/ => { | ||
};return __sveltets_2_any(0)},}});/*Ωignore_startΩ*/const {f} = $$_tnenopmoC0.$$prop_def;/*Ωignore_endΩ*/ | ||
Component} |
12 changes: 12 additions & 0 deletions
12
packages/svelte2tsx/test/htmlx2jsx/samples/editing-unclosed-block.v5/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div> | ||
{#if foo} | ||
</div> | ||
|
||
<div> | ||
{#each array as item} | ||
{#if i} | ||
</div> | ||
|
||
<Component> | ||
{#snippet f} | ||
</Component> |
20 changes: 20 additions & 0 deletions
20
packages/svelte2tsx/test/htmlx2jsx/samples/editing-unclosed-tag.v5/expected.error.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"code": "expected_token", | ||
"message": "Expected token >\nhttps://svelte.dev/e/expected_token", | ||
"filename": "(unknown)", | ||
"start": { | ||
"line": 3, | ||
"column": 2, | ||
"character": 24 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"column": 2, | ||
"character": 24 | ||
}, | ||
"position": [ | ||
24, | ||
24 | ||
], | ||
"frame": "1: <div>\n2: <Comp a={b}\n3: </div>\n ^\n4: \n5: <div>" | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/svelte2tsx/test/htmlx2jsx/samples/editing-unclosed-tag.v5/expectedv2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ svelteHTML.createElement("div", {}); | ||
{ const $$_pmoC1C = __sveltets_2_ensureComponent(Comp); new $$_pmoC1C({ target: __sveltets_2_any(), props: { "a":b,}}); | ||
} } | ||
|
||
{ svelteHTML.createElement("div", {}); | ||
{ svelteHTML.createElement("span", { "a":b,});} } |
7 changes: 7 additions & 0 deletions
7
packages/svelte2tsx/test/htmlx2jsx/samples/editing-unclosed-tag.v5/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div> | ||
<Comp a={b} | ||
</div> | ||
|
||
<div> | ||
<span a={b} | ||
</div> |