Created
March 21, 2019 04:01
-
-
Save akrantz/2b013f2e34173839c75733353b8ebd79 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
name: cancelable function | |
description: '' | |
host: EXCEL | |
api_set: {} | |
script: | |
content: |- | |
/** | |
* An example of a cancelable function | |
* @customfunction | |
*/ | |
function cancelable(invocation: CustomFunctions.CancelableInvocation) { | |
const timeout = setTimeout(() => console.log("TIMEOUT"), 10000); | |
invocation.onCanceled = () => { | |
clearTimeout(timeout); | |
console.log("CLEARED"); | |
}; | |
console.log(invocation); | |
} | |
language: typescript | |
libraries: | | |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js | |
@types/office-js | |
[email protected]/dist/css/fabric.min.css | |
[email protected]/dist/css/fabric.components.min.css | |
[email protected]/client/core.min.js | |
@types/core-js | |
@microsoft/[email protected]/dist/office.helpers.min.js | |
@microsoft/[email protected]/dist/office.helpers.d.ts | |
[email protected] | |
@types/[email protected] | |
@types/custom-functions-runtime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment