Skip to content

Commit 3476c26

Browse files
authored
Merge pull request #235 from takker99:use-status-bar
feat(useStatusBar): Enable to dispose by `using` statement
2 parents 344a147 + 757479f commit 3476c26

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)