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

chore: also export DevToolbarApp type for API #9273

Merged
merged 5 commits into from
Dec 4, 2023
Merged

Conversation

alexanderniebuhr
Copy link
Member

Changes

  • If you write your own Dev Toolbar App and want to type it, you need exported types.
  • Before it was interface DevOverlayPlugin
  • I kept the existing one, but added a copy as interface DevToolbarApp
  • I would probably like to export the same interface as two names, but I'm not sure how to do it with typescript

Testing

  • manually tested

Docs

  • not needed for the change, but I wonder if we should have an typed example in the Dev Toolbar App API reference page

cc @sarah11918

Copy link

changeset-bot bot commented Dec 2, 2023

🦋 Changeset detected

Latest commit: 7518449

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 pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Dec 2, 2023
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

You can alias the existing types with the method I commented here!

I think the best thing to do would be to rename the existing types to match the new "Toolbar" name and then add exported aliases for the old names. Does that make sense?

packages/astro/src/@types/astro.ts Outdated Show resolved Hide resolved
alexanderniebuhr and others added 3 commits December 4, 2023 16:49
Co-authored-by: Nate Moore <7118177+natemoo-re@users.noreply.github.com>
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Thanks!

@matthewp matthewp merged commit 9887f24 into main Dec 4, 2023
14 checks passed
@matthewp matthewp deleted the nbhr/devtoolbarapp-type branch December 4, 2023 17:46
This was referenced Dec 4, 2023
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) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants