-
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.
feat: update attr tag type generation to align with marko core
- Loading branch information
1 parent
7da97ae
commit aff5f68
Showing
19 changed files
with
229 additions
and
276 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": minor | ||
"@marko/language-tools": minor | ||
"@marko/type-check": minor | ||
"marko-vscode": minor | ||
--- | ||
|
||
Align attribute tag type generation with new types from Marko core. |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
21 changes: 12 additions & 9 deletions
21
...tr-tag-target-property/__snapshots__/attr-tag-target-property.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,13 +1,16 @@ | ||
## Diagnostics | ||
### Ln 10, Col 4 | ||
### Ln 6, Col 4 | ||
```marko | ||
8 | </> | ||
9 | | ||
> 10 | <@item> | ||
| ^^^^^ Type '{ renderBody: () => MarkoReturn<void>; [Symbol.iterator]: any; }' is not assignable to type 'AttrTag<{ x: number; renderBody?: Body<[], void> | undefined; }>'. | ||
Property 'x' is missing in type '{ renderBody: () => MarkoReturn<void>; [Symbol.iterator]: any; }' but required in type '{ x: number; renderBody?: Body<[], void> | undefined; }'. | ||
11 | Hello! | ||
12 | </> | ||
13 | </test-tag> | ||
4 | | ||
5 | <test-tag> | ||
> 6 | <@item x=1> | ||
| ^^^^^ Type '{ x: number; renderBody: () => MarkoReturn<void>; [Symbol.iterator]: any; } | { renderBody: () => MarkoReturn<void>; [Symbol.iterator]: any; x?: undefined; }' is not assignable to type 'AttrTag<{ x: number; renderBody?: Body<[], void> | undefined; }>'. | ||
Type '{ renderBody: () => MarkoReturn<void>; [Symbol.iterator]: any; x?: undefined; }' is not assignable to type 'AttrTag<{ x: number; renderBody?: Body<[], void> | undefined; }>'. | ||
Type '{ renderBody: () => MarkoReturn<void>; [Symbol.iterator]: any; x?: undefined; }' is not assignable to type '{ x: number; renderBody?: Body<[], void> | undefined; }'. | ||
Types of property 'x' are incompatible. | ||
Type 'undefined' is not assignable to type 'number'. | ||
7 | Hello! | ||
8 | </> | ||
9 | | ||
``` | ||
|
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 |
---|---|---|
|
@@ -2,5 +2,5 @@ export interface Input { | |
items: Marko.AttrTag<{ | ||
x: number; | ||
renderBody?: Marko.Body; | ||
}>[] | ||
}> | ||
} |
2 changes: 1 addition & 1 deletion
2
...nguage-server/src/__tests__/fixtures/script/attr-tags-for-narrowing/components/list.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,5 +1,5 @@ | ||
export interface Input { | ||
item?: Marko.RepeatableAttrTag<{ | ||
item?: Marko.AttrTag<{ | ||
size?: "small" | "large" | ||
}> | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...erver/src/__tests__/fixtures/script/recursive-input-scope-hoist/components/comments.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,10 +1,10 @@ | ||
static interface Comment { | ||
id: string; | ||
renderBody: Marko.Body; | ||
comment?: Marko.RepeatableAttrTag<Comment>; | ||
comment?: Marko.AttrTag<Comment>; | ||
} | ||
export interface Input { | ||
comment: Marko.RepeatableAttrTag<Comment>; | ||
comment: Marko.AttrTag<Comment>; | ||
} | ||
|
||
// Empty |
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
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
Oops, something went wrong.