Skip to content

Commit

Permalink
Merge pull request #326 from marko-js/fix-type-internal-types
Browse files Browse the repository at this point in the history
fix: internal types issue
  • Loading branch information
DylanPiercey authored Dec 28, 2024
2 parents 3798b67 + b65c79b commit 2a4a0e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .changeset/stale-starfishes-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@marko/language-tools": patch
"@marko/language-server": patch
"@marko/type-check": patch
"marko-vscode": patch
---

Fix type issue in the internal language tool types.
14 changes: 8 additions & 6 deletions packages/language-tools/marko.internal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,16 @@ declare global {
? NativeTagRenderer<Name>
: [Name] extends [AnyMarkoBody]
? BodyRenderer<Name>
: [Name] extends [{ [BodyContentKey]?: AnyMarkoBody }]
? [Name[DefaultBodyContentKey]] extends [AnyMarkoBody]
? BodyRenderer<Name[DefaultBodyContentKey]>
: [Name] extends [
{
[BodyContentKey in DefaultBodyContentKey]?: AnyMarkoBody;
},
]
? [Name[BodyContentKey]] extends [AnyMarkoBody]
? BodyRenderer<Name[BodyContentKey]>
: BaseRenderer<
BodyContentInput<
BodyParameters<
Exclude<Name[DefaultBodyContentKey], void>
>
BodyParameters<Exclude<Name[BodyContentKey], void>>
>
>
: DefaultRenderer;
Expand Down

0 comments on commit 2a4a0e7

Please sign in to comment.