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

Consistent MD frontmatter typing #5294

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

mrienstra
Copy link
Contributor

Changes

  • MarkdownAstroData["frontmatter"] was too vague (object), now using MarkdownInstance
  • MarkdownParserResponse uses MarkdownInstance (minor)
  • I was going to go with something more like:
    export type MarkdownAstroData<T extends Record<string, any>> = {
        frontmatter: MarkdownInstance<T>['frontmatter'];
    };
    ... but I didn't want to make those generic (breaking change).

Testing

n/a, type changes only

Docs

n/a, type changes only

@mrienstra mrienstra requested a review from a team as a code owner November 3, 2022 19:22
@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2022

🦋 Changeset detected

Latest commit: 505e78a

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

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 3, 2022
@sarah11918 sarah11918 removed the request for review from a team November 3, 2022 21:15
@matthewp
Copy link
Contributor

matthewp commented Nov 4, 2022

@mrienstra needs a changeset, thanks!

@matthewp matthewp merged commit ae41f25 into withastro:main Nov 10, 2022
@matthewp
Copy link
Contributor

Thank you!

@astrobot-houston astrobot-houston mentioned this pull request Nov 10, 2022
@mrienstra mrienstra deleted the type-md-frontmatter branch November 11, 2022 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants