Browse Source

add hint to define TResult type

master
Loopcruitment 3 years ago
parent
commit
50c4f306fb
2 changed files with 3 additions and 1 deletions
  1. +1
    -0
      README.md
  2. +2
    -1
      src/get-arnie-quotes.ts

+ 1
- 0
README.md View File

@ -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.


+ 2
- 1
src/get-arnie-quotes.ts View File

@ -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<TResult[]> => {
// TODO: Implement this function.


Loading…
Cancel
Save