withastro / compiler

The Astro compiler. Written in Go. Distributed as WASM.
Other
503 stars 59 forks source link

feat: specify `Astro.self` type in TSX output #843

Closed 43081j closed 1 year ago

43081j commented 1 year ago

Changes

This depends on withastro/astro#7866.

Given the new AstroGlobal type parameter (Self), we can strongly type it to the current default component.

So here i've updated the compiler to output typeof __AstroComponent_ (or whatever name we generated for it).

Testing

Updated the existing tests to assert for the added parameter.

Docs

N/A

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 646e0fc3e7c7e36424fd75e9bd79732e758f9cd9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @astrojs/compiler | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR