From 1def2646d99d0776bec722e3b390e70eadcb59cc Mon Sep 17 00:00:00 2001 From: mscharlock Date: Fri, 14 Sep 2018 14:32:50 -0700 Subject: [PATCH] renaming file --- .../custom-functions-runtime-tests.ts | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 types/custom-functions-runtime/custom-functions-runtime-tests.ts diff --git a/types/custom-functions-runtime/custom-functions-runtime-tests.ts b/types/custom-functions-runtime/custom-functions-runtime-tests.ts deleted file mode 100644 index d23e2e60e6..0000000000 --- a/types/custom-functions-runtime/custom-functions-runtime-tests.ts +++ /dev/null @@ -1,32 +0,0 @@ -function ADD10(n: number) { - return n + 10; -} - -declare const CustomFunctionMappings: { - "addTen": ADD10(); -}; - -async function getStockValues(ticker: string, handler: CustomFunctions.StreamingHandler) { - const dollars = await (await fetch(`myService.com/prices/${ticker}`)).json(); - handler.setResult(dollars) -} - -async function getStockValuesOneTime(ticker: string, handler: CustomFunctions.CancelableHandler) { - var shouldStop = false; - handler.onCanceled = () => shouldStop = true; - await pause(1000); - - if (shouldStop) { - return null; - } - - const dollars = await (await fetch(`myService.com/prices/${ticker}`)).json(); - return dollars; -} - -async function getStockValuesNowWithNoCancelling(ticker: string) { - const dollars = await (await fetch(`myService.com/prices/${ticker}`)).json(); - return dollars; -} - -declare function pause(ms: number): Promise