[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up types and expose more types to users #1816

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Conversation

drwpow
Copy link
Member
@drwpow drwpow commented Nov 13, 2021

Changes

  1. Combines astro-core and astro-runtime. Originally separated because we thought we’d have a lot of types, but after the cleanup it’s not much at all. Combined into one astro file.
  2. Deletes duplicate/unused types (except those that seemed to be exported for user benefit)
  3. Adds JSDoc comments to the public-facing types
  4. Renames public-facing types to be easier to find (e.g. Page or RSS)

Testing

Tests should pass

Docs

Docs added in the form of JSDoc for types

@drwpow drwpow requested a review from a team as a code owner November 13, 2021 00:35
@changeset-bot
Copy link
changeset-bot bot commented Nov 13, 2021

⚠️ No Changeset found

Latest commit: a564ba2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@netlify
Copy link
netlify bot commented Nov 13, 2021

✔️ Deploy Preview for astro-www ready!

🔨 Explore the source changes: a564ba2

🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-www/deploys/61933858e5772c00084e29ac

😎 Browse the preview: https://deploy-preview-1816--astro-www.netlify.app

@netlify
Copy link
netlify bot commented Nov 13, 2021

❌ Deploy Preview for astro-docs-2 failed.

🔨 Explore the source changes: a564ba2

🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-docs-2/deploys/619338586383870007ac38ee

* The Astro User Config Format:
* This is the type interface for your astro.config.mjs default export.
* Astro.* available in all components
* Docs: https://docs.astro.build/reference/api-reference/#astro-global
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2021-11-12 at 17 40 16

Adding a URL makes finding the API docs easier

* Page Prop
* Docs: https://docs.astro.build/guides/pagination/#using-the-page-prop
*/
export interface Page<T = any> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One example of renaming PaginatedCollectionProps to simply Page for users to find more easily.

@drwpow drwpow changed the title Clean up, simplify types Clean up types and expose more types to users Nov 13, 2021
@matthewp
Copy link
Contributor

If you rebase with main this should pass again now.

@drwpow drwpow force-pushed the astro-types-cleanup branch 2 times, most recently from bee61ae to d6aedfd Compare November 15, 2021 21:55
Also add JSDoc to external types
Copy link
Contributor
@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@drwpow drwpow merged commit c8544a2 into main Nov 16, 2021
@drwpow drwpow deleted the astro-types-cleanup branch November 16, 2021 21:00
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
Also add JSDoc to external types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants