[google-apps-script] Modify type definitions of functions which can return null (#20517)

* Fix type definition of `SpreadsheetApp.getActive`

* Fix type definition of `SpreadsheetApp.getActiveSpreadsheet`
This commit is contained in:
Azoson
2017-10-14 07:09:54 +09:00
committed by Wesley Wigham
parent f7520ec7bc
commit 97d6470bb0

View File

@@ -1085,7 +1085,7 @@ declare namespace GoogleAppsScript {
/**
* Returns the currently active spreadsheet, or null if there is none.
*/
getActive(): Spreadsheet;
getActive(): Spreadsheet | null;
/**
* Returns the range of cells that is currently considered active.
*/
@@ -1097,7 +1097,7 @@ declare namespace GoogleAppsScript {
/**
* Returns the currently active spreadsheet, or null if there is none.
*/
getActiveSpreadsheet(): Spreadsheet;
getActiveSpreadsheet(): Spreadsheet | null;
/**
* Returns an instance of the spreadsheet's user-interface environment that allows the script to add features like menus, dialogs, and sidebars.
*/