From 50c4f306fb9e35c05bc39b5309e7a7face3f5dd1 Mon Sep 17 00:00:00 2001 From: Loopcruitment Date: Fri, 23 Jul 2021 21:10:06 +1000 Subject: [PATCH] add hint to define TResult type --- README.md | 1 + src/get-arnie-quotes.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0edc545..8b8a546 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Note that for this challenge, the HTTP calls are mocked. You *must* use the prov ## Tips * Only modify the `get-arnie-quotes.ts` file. +* Properly define the `TResult` type. * You may introduce additional internal functions in `get-arnie-quotes.ts` * Exploring all of the code files may provide you with useful hints. * Not all of the requirements are covered by the unit tests. diff --git a/src/get-arnie-quotes.ts b/src/get-arnie-quotes.ts index 22f8529..006a24b 100644 --- a/src/get-arnie-quotes.ts +++ b/src/get-arnie-quotes.ts @@ -1,6 +1,7 @@ import { httpGet } from './mock-http-interface'; -type TResult = {"Arnie Quote" : string} | { "FAILURE" : string} +// TODO define this type properly +type TResult = any; export const getArnieQuotes = async (urls : string[]) : Promise => { // TODO: Implement this function.