Skip to content

Commit 757479f

Browse files
committed
feat(useStatusBar): Enable to dispose by using statement
1 parent 344a147 commit 757479f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

browser/dom/statusBar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { statusBar } from "./dom.ts";
22

3-
export interface UseStatusBarResult {
3+
export interface UseStatusBarResult extends Disposable {
44
/** Display information in the acquired status bar section
55
*
66
* @param items - Array of items to display (text, icons, or groups)
@@ -31,6 +31,7 @@ export const useStatusBar = (): UseStatusBarResult => {
3131
if (child) status.append(child);
3232
},
3333
dispose: () => status.remove(),
34+
[Symbol.dispose]: () => status.remove(),
3435
};
3536
};
3637

0 commit comments

Comments
 (0)