Skip to content

Commit 26b9fc0

Browse files
Merge pull request #11 from MaksymStoianov/max/next
Max/next
2 parents c2fb4ce + 995d7ab commit 26b9fc0

File tree

98 files changed

+673
-286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+673
-286
lines changed

README.md

Lines changed: 57 additions & 54 deletions
Large diffs are not rendered by default.

src/abstract/Class.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { hashCode } from "../base";
22

33
/**
4+
* ## Class
5+
*
46
* Abstract base class providing fundamental functionality for subclasses.
57
* Intended to be extended by other classes.
68
*
79
* @abstract
810
* @class Class
9-
* @since 0.1.0
10-
* @version 0.1.0
11+
* @since 1.0.0
12+
* @version 1.0.0
1113
*/
1214
export abstract class Class {
1315
/**
@@ -44,6 +46,7 @@ export abstract class Class {
4446
* - `true` if the objects are equivalent,
4547
* - `false` otherwise.
4648
*/
49+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4750
equals(input: any): boolean {
4851
if (this === input) {
4952
return true;
@@ -76,10 +79,12 @@ export abstract class Class {
7679
*/
7780
valueOf(): object {
7881
const result: {
82+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7983
[key: string]: any;
8084
} = {};
8185

8286
for (const key of Object.keys(this)) {
87+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8388
result[key] = (this as any)[key];
8489
}
8590

src/appsscript/checkMultipleAccount.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { requireValidEmail } from "../base";
22

33
/**
4+
* ## checkMultipleAccount
5+
*
46
* If the user is logged into multiple accounts in the same browser session, `google.script.run` might execute under a different account than the one that initiated the UI display.
57
*
68
* @param email - The email address of the account that initiated the display of the user interface.
79
* @returns `true` if the initiating account's email does not match the effective user's email, indicating a multi-account conflict; `false` otherwise.
10+
* @since 1.0.0
11+
* @version 1.0.0
812
* @environment `Google Apps Script`
913
*/
1014
export function checkMultipleAccount(email: string): boolean {

src/appsscript/getByteSize.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { requireString } from "../base";
22

33
/**
4+
* ## getByteSize
5+
*
46
* Returns the length of a string in `UTF-8` encoding, measured in bytes.
57
*
68
* @param value - The string whose length will be calculated in bytes.
79
* @returns The length of the input string in bytes.
10+
* @since 1.0.0
11+
* @version 1.0.0
812
* @environment `Google Apps Script`
913
*/
1014
export function getByteSize(value: string): number {

src/appsscript/isHtmlOutput.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ import { isFunction, isObject } from "../base";
33
type HtmlOutput = GoogleAppsScript.HTML.HtmlOutput;
44

55
/**
6+
* ## isHtmlOutput
7+
*
68
* Checks if the given value is a Google Apps Script [`HtmlOutput`](https://developers.google.com/apps-script/reference/html/html-output) object.
79
*
810
* @param value - The value to check.
911
* @returns `true` if the value is an {@link GoogleAppsScript.HTML.HtmlOutput|HtmlOutput} object, `false` otherwise.
12+
* @see [Class HtmlOutput](https://developers.google.com/apps-script/reference/html/html-output)
13+
* @since 1.0.0
14+
* @version 1.0.0
1015
* @environment `Google Apps Script`
1116
*/
1217
export function isHtmlOutput(value: unknown): value is HtmlOutput {

src/appsscript/isTextOutput.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ import { isFunction, isObject } from "../base";
33
type TextOutput = GoogleAppsScript.Content.TextOutput;
44

55
/**
6+
* ## isTextOutput
7+
*
68
* Checks if the given value is a Google Apps Script [`TextOutput`](https://developers.google.com/apps-script/reference/content/text-output) object.
79
*
810
* @param value - The value to check.
911
* @returns `true` if the value is an {@link GoogleAppsScript.Content.TextOutput|TextOutput} object, `false` otherwise.
12+
* @see [Class TextOutput](https://developers.google.com/apps-script/reference/content/text-output)
13+
* @since 1.0.0
14+
* @version 1.0.0
1015
* @environment `Google Apps Script`
1116
*/
1217
export function isTextOutput(value: unknown): value is TextOutput {

src/appsscript/isUi.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import { isObject } from "../base";
22

33
/**
4+
* ## isUi
5+
*
46
* Checks if the given value is a Google Apps Script [`Ui`](https://developers.google.com/apps-script/reference/base/ui.html) object.
57
*
68
* @param value - The value to check.
79
* @returns `true` if the value is an {@link GoogleAppsScript.Base.Ui|Ui} object, `false` otherwise.
10+
* @see [Class Ui](https://developers.google.com/apps-script/reference/base/ui.html)
11+
* @since 1.0.0
12+
* @version 1.0.0
813
* @environment `Google Apps Script`
914
*/
1015
export function isUi(value: unknown): value is GoogleAppsScript.Base.Ui {

src/appsscript/sheets/appendColumn.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import { appendColumns, Options } from "./appendColumns";
22

33
/**
4+
* ## appendColumn
5+
*
46
* Appends a single column to the right of the current data area on a [`sheet`](https://developers.google.com/apps-script/reference/spreadsheet/sheet).
57
* If a cell's content starts with `=`, it is interpreted as a formula.
68
*
79
* @param sheet - The Google Apps Script {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object to which the column will be appended.
810
* @param values - A 1D array containing the data for the single column.
911
* @param [options] - Additional parameters to customize the method's behavior.
1012
* @returns The {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object.
11-
* @since 0.1.0
13+
* @see appendColumns
14+
* @see [Class Range](https://developers.google.com/apps-script/reference/spreadsheet/range)
15+
* @see [Class Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet)
16+
* @since 1.0.0
1217
* @version 1.4.0
1318
* @environment `Google Apps Script`
1419
* @author Maksym Stoianov <stoianov.maksym@gmail.com>

src/appsscript/sheets/appendColumns.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ export interface Options {
1010
}
1111

1212
/**
13+
* ## appendColumns
14+
*
1315
* Appends columns to the right of the current data area on a [`sheet`](https://developers.google.com/apps-script/reference/spreadsheet/sheet).
1416
* If a cell's content starts with `=`, it will be interpreted as a formula.
1517
*
16-
* #### Example
18+
* @example
1719
* ```javascript
1820
* const ss = SpreadsheetApp.getActiveSpreadsheet();
1921
* const sheet = ss.getSheetByName('Sheet Name');
@@ -29,7 +31,10 @@ export interface Options {
2931
* @param values - A 2D array containing the data to append.
3032
* @param [options] - Additional parameters to customize the method's behavior.
3133
* @returns The {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object.
32-
* @since 0.1.0
34+
* @see appendColumn
35+
* @see [Class Range](https://developers.google.com/apps-script/reference/spreadsheet/range)
36+
* @see [Class Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet)
37+
* @since 1.0.0
3338
* @version 1.4.0
3439
* @environment `Google Apps Script`
3540
* @author Maksym Stoianov <stoianov.maksym@gmail.com>

src/appsscript/sheets/appendRow.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import { appendRows, Options } from "./appendRows";
22

33
/**
4+
* ## appendRow
5+
*
46
* Appends a single row to the bottom of the current data area on a [`sheet`](https://developers.google.com/apps-script/reference/spreadsheet/sheet).
57
* If a cell's content starts with `=`, it is interpreted as a formula.
68
*
79
* @param sheet - The Google Apps Script {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object to which the row will be appended.
810
* @param values - A 1D array containing the data for the single row.
911
* @param [options] - Additional parameters to customize the method's behavior.
1012
* @returns The {@link GoogleAppsScript.Spreadsheet.Sheet|Sheet} object.
11-
* @since 0.1.0
13+
* @see prependRow
14+
* @see appendRows
15+
* @see [Class Range](https://developers.google.com/apps-script/reference/spreadsheet/range)
16+
* @see [Class Sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet)
17+
* @since 1.0.0
1218
* @version 1.4.0
1319
* @environment `Google Apps Script`
1420
* @author Maksym Stoianov <stoianov.maksym@gmail.com>

0 commit comments

Comments
 (0)