-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathisUi.ts
More file actions
15 lines (14 loc) · 744 Bytes
/
isUi.ts
File metadata and controls
15 lines (14 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { isObject } from "../../lang";
/**
* Checks if the given value is a Google Apps Script <a href="https://developers.google.com/apps-script/reference/base/ui"><code>Ui</code></a> object.
*
* @param {unknown} value - The value to check.
* @returns {boolean} `true` if the value is an <a href="https://developers.google.com/apps-script/reference/base/ui"><code>Ui</code></a> object, `false` otherwise.
* @see <a href="https://developers.google.com/apps-script/reference/base/ui"><code>Ui</code></a>
* @since 1.0.0
* @version 1.0.0
* @environment `Google Apps Script`
*/
export function isUi(value: unknown): value is GoogleAppsScript.Base.Ui {
return isObject(value) && value?.toString() === "Ui";
}