From 97d6470bb0122a7a47dc17afbcd0c7fd75ce8617 Mon Sep 17 00:00:00 2001 From: Azoson Date: Sat, 14 Oct 2017 07:09:54 +0900 Subject: [PATCH] [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` --- types/google-apps-script/google-apps-script.spreadsheet.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts index e710fcfb4a..22f2aff3e6 100644 --- a/types/google-apps-script/google-apps-script.spreadsheet.d.ts +++ b/types/google-apps-script/google-apps-script.spreadsheet.d.ts @@ -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. */