Skip to content

Commit

Permalink
chore: also export DevToolbarApp type for API (#9273)
Browse files Browse the repository at this point in the history
* chore: also export `DevToolbarApp` type for API

* chore: changeset

* chore: resolve review comments

Co-authored-by: Nate Moore <7118177+natemoo-re@users.noreply.github.com>

* Update .changeset/smooth-gifts-train.md

---------

Co-authored-by: Nate Moore <7118177+natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 4, 2023
1 parent 6a9669b commit 9887f24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smooth-gifts-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Exports type for Dev Toolbar App under correct name
4 changes: 3 additions & 1 deletion packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2578,14 +2578,16 @@ export interface ClientDirectiveConfig {
entrypoint: string;
}

export interface DevOverlayPlugin {
export interface DevToolbarApp {
id: string;
name: string;
icon: Icon;
init?(canvas: ShadowRoot, eventTarget: EventTarget): void | Promise<void>;
beforeTogglingOff?(canvas: ShadowRoot): boolean | Promise<boolean>;
}

export type DevOverlayPlugin = DevToolbarApp;

export type DevOverlayMetadata = Window &
typeof globalThis & {
__astro_dev_overlay__: {
Expand Down

0 comments on commit 9887f24

Please sign in to comment.