File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
types/custom-functions-runtime Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ function callerAddress(invocation: CustomFunctions.Invocation) {
1414 return invocation . address ;
1515}
1616
17+ function isInValuePreview ( invocation : CustomFunctions . Invocation ) {
18+ return invocation . isInValuePreview ;
19+ }
20+
1721async function getStockValues ( ticker : string ) : Promise < number > {
1822 const response = await fetch ( `myService.com/prices/${ ticker } ` ) ;
1923 return ( await response . json ( ) ) [ "price" ] ;
Original file line number Diff line number Diff line change @@ -75,6 +75,16 @@ declare namespace CustomFunctions {
7575 * [Api set: CustomFunctionsRuntime 1.3]
7676 */
7777 parameterAddresses ?: string [ ] ;
78+
79+ /**
80+ * Indicates whether the function is invoked as part of the formula value preview.
81+ * `isInValuePreview` is read-only and can't be set by a custom functions add-in.
82+ * This value is `true` if the function is invoked to preview the formula value; otherwise it is `false`.
83+ *
84+ * @remarks
85+ * [Api set: CustomFunctionsRuntime 1.5]
86+ */
87+ isInValuePreview ?: string ;
7888 }
7989
8090 /**
You can’t perform that action at this time.
0 commit comments