Files
blockly/core/interfaces/i_has_bubble.ts
Beka Westberg 42b8c6e3ab fix: return annotations (#7118)
* chore: remove suppress annotations

* chore: remove fileoverview annotation

* chore: remove other unused annotations

* chore: change return to returns

* chore: enable tag linting
2023-05-24 13:01:33 -07:00

21 lines
542 B
TypeScript

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export interface IHasBubble {
/** @returns True if the bubble is currently open, false otherwise. */
bubbleIsVisible(): boolean;
/** Sets whether the bubble is open or not. */
setBubbleVisible(visible: boolean): void;
}
/** Type guard that checks whether the given object is a IHasBubble. */
export function hasBubble(obj: any): obj is IHasBubble {
return (
obj.bubbleIsVisible !== undefined && obj.setBubbleVisible !== undefined
);
}