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
export type Unwrap<T> = T extends Promise<infer U> | |
? U | |
: T extends (...args: any) => Promise<infer U> | |
? U | |
: T extends (...args: any) => infer U | |
? U | |
: T; |
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
import axios from "axios"; | |
const getRequest = async (url) => { | |
try { | |
const response = await axios.get(url); | |
if (response.status === 200) { | |
return response.data; | |
} else throw new Error("Any error text"); | |
} catch (error) { | |
console.log(error); |
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
{"version":1,"resource":"file:///Users/i-mighty/Documents/Zeeh%20Africa/backend-v2/apps/api/src/app/services/get-app.service.ts","entries":[{"id":"HMcy.ts","timestamp":1663772595894},{"id":"LjFh.ts","timestamp":1663773555961}]} |
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
Read up the docs on how to setup the cli. | |
If you need to setup for pipeline or for production without the CLI, you would need to make some modification to the code. | |
Blessings |
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
{"lastUpload":"2021-07-28T18:41:31.661Z","extensionVersion":"v3.4.3"} |