This commit is contained in:
parent
39384ea727
commit
d37a7fa392
35
types.js
35
types.js
|
@ -1,34 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
module.exports._typesOnly = true;
|
||||
|
||||
/**
|
||||
* @callback Request
|
||||
* @param {RequestOptions} opts
|
||||
* @returns {Response}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} RequestOptions
|
||||
* @prop {any} [opts.body]
|
||||
* @prop {Object.<String,any>} [opts.form]
|
||||
* @prop {Headers} [opts.headers]
|
||||
* @prop {String} [opts.method]
|
||||
* @prop {Boolean | any} [opts.json]
|
||||
* @prop {String} opts.url
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} Response
|
||||
* @prop {any} body
|
||||
* @prop {Headers} headers
|
||||
* @prop {Boolean} ok
|
||||
* @prop {any} [response] - TODO (browser only)
|
||||
* @prop {any} [request] - TODO
|
||||
* @prop {String} status
|
||||
* @prop {Number} statusCode
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object.<String,String|Array<String>>} Headers
|
||||
* @typedef {import('./').RequestOptions} RequestOptions
|
||||
* @typedef {import('./').Response} Response
|
||||
* @typedef {import('./').Headers} Headers
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue