File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { isObject } from "../../base";
77 *
88 * @param value - The value to check.
99 * @returns `true` if the value is a {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object, `false` otherwise.
10+ * @see nonSheet
1011 * @see [Class Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet)
1112 * @since 1.0.0
1213 * @version 1.0.0
Original file line number Diff line number Diff line change 1- import { isObject } from "../../base " ;
1+ import { isSheet } from "./isSheet " ;
22
33/**
4- * ## isSheet
4+ * ## nonSheet
55 *
6- * Checks if the given value is a Google Apps Script [` Sheet`](https://developers.google.com/apps-script/reference/spreadsheet/sheet) object.
6+ * Checks if the provided value is not a [`Google Sheet`](https://developers.google.com/apps-script/reference/spreadsheet/sheet) object.
77 *
8- * @param value - The value to check.
9- * @returns `true` if the value is a {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object, `false` otherwise.
8+ * @param value - The value to check.
9+ * @returns `true` if the value is not a {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object.
10+ * @see isSheet
1011 * @see [Class Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet)
11- * @since 1.0 .0
12+ * @since 1.3 .0
1213 * @version 1.0.0
13- * @environment ` Google Apps Script`, `Browser`
14+ * @environment Google Apps Script
1415 */
15- export function isSheet (
16- value : unknown
17- ) : value is GoogleAppsScript . Spreadsheet . Sheet {
18- return isObject ( value ) && value ?. toString ( ) === "Sheet" ;
16+ export function nonSheet < T > (
17+ value : T | GoogleAppsScript . Spreadsheet . Sheet
18+ ) : value is T {
19+ return ! isSheet ( value ) ;
1920}
You can’t perform that action at this time.
0 commit comments