Allow got as request backend
This commit is contained in:
45
src/lib/utils/requestbackends/reference.js
Normal file
45
src/lib/utils/requestbackends/reference.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @typedef GrabResponse
|
||||
* @property {number} status
|
||||
*/
|
||||
|
||||
// @ts-nocheck
|
||||
|
||||
class GrabReference {
|
||||
/**
|
||||
* @param {string} url
|
||||
* @param {any} options
|
||||
*/
|
||||
constructor(url, options) {
|
||||
throw new Error("This is the reference class, do not instantiate it.")
|
||||
}
|
||||
|
||||
// Please help me type this
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
stream() {}
|
||||
|
||||
/**
|
||||
* @returns {Promise<GrabResponse>}
|
||||
*/
|
||||
response() {}
|
||||
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
json() {}
|
||||
|
||||
/**
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
text() {}
|
||||
|
||||
/**
|
||||
* @param {(res: GrabResponse) => any}
|
||||
* @returns {Promise<Reference>}
|
||||
*/
|
||||
check(test) {}
|
||||
}
|
||||
|
||||
module.exports = GrabReference
|
||||
Reference in New Issue
Block a user