Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: specify options parameter type in zlib.md #21920

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions doc/api/zlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,18 +480,18 @@ Provides an object enumerating Zlib-related constants.
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Deflate`][] object with the given [`options`][].
Creates and returns a new [`Deflate`][] object.

## zlib.createDeflateRaw([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`DeflateRaw`][] object with the given [`options`][].
Creates and returns a new [`DeflateRaw`][] object.

An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`
is set to 8 for raw deflate streams. zlib would automatically set `windowBits`
Expand All @@ -505,45 +505,45 @@ that effectively uses an 8-bit window only.
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Gunzip`][] object with the given [`options`][].
Creates and returns a new [`Gunzip`][] object.

## zlib.createGzip([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Gzip`][] object with the given [`options`][].
Creates and returns a new [`Gzip`][] object.

## zlib.createInflate([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Inflate`][] object with the given [`options`][].
Creates and returns a new [`Inflate`][] object.

## zlib.createInflateRaw([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`InflateRaw`][] object with the given [`options`][].
Creates and returns a new [`InflateRaw`][] object.

## zlib.createUnzip([options])
<!-- YAML
added: v0.5.8
-->

* `options` {Object}
* `options` {zlib options}

Creates and returns a new [`Unzip`][] object with the given [`options`][].
Creates and returns a new [`Unzip`][] object.

## Convenience Methods

Expand Down Expand Up @@ -572,7 +572,7 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.deflateSync(buffer[, options])
Expand All @@ -591,7 +591,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Compress a chunk of data with [`Deflate`][].

Expand All @@ -608,7 +608,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.deflateRawSync(buffer[, options])
Expand All @@ -627,7 +627,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Compress a chunk of data with [`DeflateRaw`][].

Expand All @@ -647,7 +647,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.gunzipSync(buffer[, options])
Expand All @@ -666,7 +666,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`Gunzip`][].

Expand All @@ -686,7 +686,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.gzipSync(buffer[, options])
Expand All @@ -705,7 +705,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Compress a chunk of data with [`Gzip`][].

Expand All @@ -725,7 +725,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.inflateSync(buffer[, options])
Expand All @@ -744,7 +744,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`Inflate`][].

Expand All @@ -764,7 +764,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.inflateRawSync(buffer[, options])
Expand All @@ -783,7 +783,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`InflateRaw`][].

Expand All @@ -803,7 +803,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}
* `callback` {Function}

### zlib.unzipSync(buffer[, options])
Expand All @@ -822,7 +822,7 @@ changes:
-->

* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
* `options` {Object}
* `options` {zlib options}

Decompress a chunk of data with [`Unzip`][].

Expand All @@ -840,7 +840,6 @@ Decompress a chunk of data with [`Unzip`][].
[`InflateRaw`]: #zlib_class_zlib_inflateraw
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
[`Unzip`]: #zlib_class_zlib_unzip
[`options`]: #zlib_class_options
[`zlib.bytesWritten`]: #zlib_zlib_byteswritten
[Memory Usage Tuning]: #zlib_memory_usage_tuning
[pool size]: cli.html#cli_uv_threadpool_size_size
Expand Down
4 changes: 3 additions & 1 deletion tools/doc/type-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ const customTypesMap = {
'URL': 'url.html#url_the_whatwg_url_api',
'URLSearchParams': 'url.html#url_class_urlsearchparams',

'MessagePort': 'worker_threads.html#worker_threads_class_messageport'
'MessagePort': 'worker_threads.html#worker_threads_class_messageport',

'zlib options': 'zlib.html#zlib_class_options',
};

const arrayPart = /(?:\[])+$/;
Expand Down