fix(*): typedefs and typings for image & webhook options (#5805)

This commit is contained in:
Shubham Parihar
2021-06-12 03:52:01 +05:30
committed by GitHub
parent 19d0405aa5
commit a5a6e22316
10 changed files with 71 additions and 58 deletions

View File

@@ -136,11 +136,16 @@ function makeImageUrl(root, { format = 'webp', size } = {}) {
/**
* Options for Image URLs.
* @typedef {Object} ImageURLOptions
* @property {string} [format] One of `webp`, `png`, `jpg`, `jpeg`, `gif`. If no format is provided,
* defaults to `webp`.
* @typedef {StaticImageURLOptions} ImageURLOptions
* @property {boolean} [dynamic] If true, the format will dynamically change to `gif` for
* animated avatars; the default is false.
* animated avatars; the default is false
*/
/**
* Options for static Image URLs.
* @typedef {Object} StaticImageURLOptions
* @property {string} [format] One of `webp`, `png`, `jpg`, `jpeg`, `gif`. If no format is provided,
* defaults to `webp`
* @property {number} [size] One of `16`, `32`, `64`, `128`, `256`, `512`, `1024`, `2048`, `4096`
*/