-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "fix: improve renderBody codegen"
This reverts commit abbb30a.
- Loading branch information
1 parent
bbddd45
commit f585449
Showing
10 changed files
with
75 additions
and
55 deletions.
There are no files selected for viewing
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,8 @@ | ||
--- | ||
"@marko/language-server": patch | ||
"@marko/language-tools": patch | ||
"@marko/type-check": patch | ||
"marko-vscode": patch | ||
--- | ||
|
||
Revert change to renderBody codegen which caused a regression with the `<await>` tag. |
19 changes: 5 additions & 14 deletions
19
...fixtures/script/custom-tag-args/__snapshots__/custom-tag-args.expected/index.md
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 |
---|---|---|
@@ -1,20 +1,11 @@ | ||
## Diagnostics | ||
### Ln 2, Col 11 | ||
### Ln 3, Col 10 | ||
```marko | ||
1 | <test-tag({ value: "hello!" })/> | ||
> 2 | <test-tag("hello!")/> | ||
| ^^^^^^^^ Argument of type 'string' is not assignable to parameter of type 'Directives & Input'. | ||
Type 'string' is not assignable to type 'Input'. | ||
3 | <test-tag("hello!", 1, 2)/> | ||
4 | | ||
``` | ||
|
||
### Ln 3, Col 21 | ||
```marko | ||
1 | <test-tag({ value: "hello!" })/> | ||
2 | <test-tag("hello!")/> | ||
1 | <test-tag("hello!")/> | ||
2 | <test-tag("hello!", 1)/> | ||
> 3 | <test-tag("hello!", 1, 2)/> | ||
| ^^^^ Expected 1 arguments, but got 3. | ||
| ^^^^^^^^^^^^^^^^ Type of computed property's value is '[string, number, number]', which is not assignable to type '[string, (number | undefined)?]'. | ||
Source has 3 element(s) but target allows only 2. | ||
4 | | ||
``` | ||
|
2 changes: 1 addition & 1 deletion
2
...s/language-server/src/__tests__/fixtures/script/custom-tag-args/components/test-tag.marko
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export interface Input { | ||
value: string | ||
value: [string, number?] | ||
} | ||
<div/> |
2 changes: 1 addition & 1 deletion
2
packages/language-server/src/__tests__/fixtures/script/custom-tag-args/index.marko
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<test-tag({ value: "hello!" })/> | ||
<test-tag("hello!")/> | ||
<test-tag("hello!", 1)/> | ||
<test-tag("hello!", 1, 2)/> |
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
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
19 changes: 10 additions & 9 deletions
19
...tag-params-basic/__snapshots__/tag-params-basic.expected/components/test-tag.md
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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
## Diagnostics | ||
### Ln 7, Col 27 | ||
### Ln 7, Col 28 | ||
```marko | ||
5 | <${input.renderBody}("a", "b") /> | ||
5 | <${input.renderBody}=["a", "b"] /> | ||
6 | | ||
> 7 | <${input.renderBody}("a", "c") /> | ||
| ^^^ Argument of type '"c"' is not assignable to parameter of type '"b"'. | ||
> 7 | <${input.renderBody}=["a", "c"] /> | ||
| ^^^ Type '"c"' is not assignable to type '"b"'. | ||
8 | | ||
9 | <${input.renderBody}("a", "b", "c") /> | ||
9 | <${input.renderBody}=["a", "b", "c"] /> | ||
10 | | ||
``` | ||
|
||
### Ln 9, Col 32 | ||
### Ln 9, Col 21 | ||
```marko | ||
7 | <${input.renderBody}("a", "c") /> | ||
7 | <${input.renderBody}=["a", "c"] /> | ||
8 | | ||
> 9 | <${input.renderBody}("a", "b", "c") /> | ||
| ^^^ Expected 2 arguments, but got 3. | ||
> 9 | <${input.renderBody}=["a", "b", "c"] /> | ||
| ^ Type '["a", "b", string]' is not assignable to type '["a", "b"]'. | ||
Source has 3 element(s) but target allows only 2. | ||
10 | | ||
``` | ||
|
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
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
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