-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from iansan5653/update-docs-exports-bug
Update docs to work around bug in `gas-webpack-plugin`
- Loading branch information
Showing
4 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export const helloWorld = "Hello, world!"; | ||
export function helloWorld() { | ||
console.log("Hello, world!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
// You can access any of the global GAS objects in this file. You can also | ||
// import local files or external dependencies: | ||
import { helloWorld } from "./example"; | ||
|
||
console.log(helloWorld); | ||
export { helloWorld } from "./example"; | ||
|
||
// Simple Triggers: These five export functions are reserved export function names that are | ||
// called by Google Apps when the corresponding event occurs. You can safely | ||
// delete them if you won't be using them, but don't use the same export function names | ||
// for anything else. | ||
// See: https://developers.google.com/apps-script/guides/triggers | ||
|
||
export function onOpen( | ||
// NOTE: only `export {...}` syntax will work. You cannot define and export a trigger in | ||
// the same line. | ||
|
||
function onOpen( | ||
e: | ||
| GoogleAppsScript.Events.DocsOnOpen | ||
| GoogleAppsScript.Events.SlidesOnOpen | ||
| GoogleAppsScript.Events.SheetsOnOpen | ||
| GoogleAppsScript.Events.FormsOnOpen | ||
| GoogleAppsScript.Events.FormsOnOpen, | ||
): void { | ||
console.log(e); | ||
} | ||
|
||
export function onEdit(e: GoogleAppsScript.Events.SheetsOnEdit): void { | ||
function onEdit(e: GoogleAppsScript.Events.SheetsOnEdit): void { | ||
console.log(e); | ||
} | ||
|
||
export function onInstall(e: GoogleAppsScript.Events.AddonOnInstall): void { | ||
function onInstall(e: GoogleAppsScript.Events.AddonOnInstall): void { | ||
console.log(e); | ||
} | ||
|
||
export function doGet(e: GoogleAppsScript.Events.DoGet): void { | ||
function doGet(e: GoogleAppsScript.Events.DoGet): void { | ||
console.log(e); | ||
} | ||
|
||
export function doPost(e: GoogleAppsScript.Events.DoPost): void { | ||
function doPost(e: GoogleAppsScript.Events.DoPost): void { | ||
console.log(e); | ||
} | ||
|
||
export { onOpen, onEdit, onInstall, doGet, doPost }; |