Skip to content

Commit e75885f

Browse files
vsemozhetbytrvagg
authored andcommitted
doc: specify options parameter type in zlib.md
Also, delete now redundant notes and links. PR-URL: #21920 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 2dc7f17 commit e75885f

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

doc/api/zlib.md

+28-29
Original file line numberDiff line numberDiff line change
@@ -480,18 +480,18 @@ Provides an object enumerating Zlib-related constants.
480480
added: v0.5.8
481481
-->
482482

483-
* `options` {Object}
483+
* `options` {zlib options}
484484

485-
Creates and returns a new [`Deflate`][] object with the given [`options`][].
485+
Creates and returns a new [`Deflate`][] object.
486486

487487
## zlib.createDeflateRaw([options])
488488
<!-- YAML
489489
added: v0.5.8
490490
-->
491491

492-
* `options` {Object}
492+
* `options` {zlib options}
493493

494-
Creates and returns a new [`DeflateRaw`][] object with the given [`options`][].
494+
Creates and returns a new [`DeflateRaw`][] object.
495495

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

508-
* `options` {Object}
508+
* `options` {zlib options}
509509

510-
Creates and returns a new [`Gunzip`][] object with the given [`options`][].
510+
Creates and returns a new [`Gunzip`][] object.
511511

512512
## zlib.createGzip([options])
513513
<!-- YAML
514514
added: v0.5.8
515515
-->
516516

517-
* `options` {Object}
517+
* `options` {zlib options}
518518

519-
Creates and returns a new [`Gzip`][] object with the given [`options`][].
519+
Creates and returns a new [`Gzip`][] object.
520520

521521
## zlib.createInflate([options])
522522
<!-- YAML
523523
added: v0.5.8
524524
-->
525525

526-
* `options` {Object}
526+
* `options` {zlib options}
527527

528-
Creates and returns a new [`Inflate`][] object with the given [`options`][].
528+
Creates and returns a new [`Inflate`][] object.
529529

530530
## zlib.createInflateRaw([options])
531531
<!-- YAML
532532
added: v0.5.8
533533
-->
534534

535-
* `options` {Object}
535+
* `options` {zlib options}
536536

537-
Creates and returns a new [`InflateRaw`][] object with the given [`options`][].
537+
Creates and returns a new [`InflateRaw`][] object.
538538

539539
## zlib.createUnzip([options])
540540
<!-- YAML
541541
added: v0.5.8
542542
-->
543543

544-
* `options` {Object}
544+
* `options` {zlib options}
545545

546-
Creates and returns a new [`Unzip`][] object with the given [`options`][].
546+
Creates and returns a new [`Unzip`][] object.
547547

548548
## Convenience Methods
549549

@@ -572,7 +572,7 @@ changes:
572572
description: The `buffer` parameter can be an `Uint8Array` now.
573573
-->
574574
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
575-
* `options` {Object}
575+
* `options` {zlib options}
576576
* `callback` {Function}
577577

578578
### zlib.deflateSync(buffer[, options])
@@ -591,7 +591,7 @@ changes:
591591
-->
592592

593593
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
594-
* `options` {Object}
594+
* `options` {zlib options}
595595

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

@@ -608,7 +608,7 @@ changes:
608608
-->
609609

610610
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
611-
* `options` {Object}
611+
* `options` {zlib options}
612612
* `callback` {Function}
613613

614614
### zlib.deflateRawSync(buffer[, options])
@@ -627,7 +627,7 @@ changes:
627627
-->
628628

629629
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
630-
* `options` {Object}
630+
* `options` {zlib options}
631631

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

@@ -647,7 +647,7 @@ changes:
647647
-->
648648

649649
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
650-
* `options` {Object}
650+
* `options` {zlib options}
651651
* `callback` {Function}
652652

653653
### zlib.gunzipSync(buffer[, options])
@@ -666,7 +666,7 @@ changes:
666666
-->
667667

668668
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
669-
* `options` {Object}
669+
* `options` {zlib options}
670670

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

@@ -686,7 +686,7 @@ changes:
686686
-->
687687

688688
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
689-
* `options` {Object}
689+
* `options` {zlib options}
690690
* `callback` {Function}
691691

692692
### zlib.gzipSync(buffer[, options])
@@ -705,7 +705,7 @@ changes:
705705
-->
706706

707707
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
708-
* `options` {Object}
708+
* `options` {zlib options}
709709

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

@@ -725,7 +725,7 @@ changes:
725725
-->
726726

727727
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
728-
* `options` {Object}
728+
* `options` {zlib options}
729729
* `callback` {Function}
730730

731731
### zlib.inflateSync(buffer[, options])
@@ -744,7 +744,7 @@ changes:
744744
-->
745745

746746
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
747-
* `options` {Object}
747+
* `options` {zlib options}
748748

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

@@ -764,7 +764,7 @@ changes:
764764
-->
765765

766766
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
767-
* `options` {Object}
767+
* `options` {zlib options}
768768
* `callback` {Function}
769769

770770
### zlib.inflateRawSync(buffer[, options])
@@ -783,7 +783,7 @@ changes:
783783
-->
784784

785785
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
786-
* `options` {Object}
786+
* `options` {zlib options}
787787

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

@@ -803,7 +803,7 @@ changes:
803803
-->
804804

805805
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
806-
* `options` {Object}
806+
* `options` {zlib options}
807807
* `callback` {Function}
808808

809809
### zlib.unzipSync(buffer[, options])
@@ -822,7 +822,7 @@ changes:
822822
-->
823823

824824
* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
825-
* `options` {Object}
825+
* `options` {zlib options}
826826

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

@@ -840,7 +840,6 @@ Decompress a chunk of data with [`Unzip`][].
840840
[`InflateRaw`]: #zlib_class_zlib_inflateraw
841841
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
842842
[`Unzip`]: #zlib_class_zlib_unzip
843-
[`options`]: #zlib_class_options
844843
[`zlib.bytesWritten`]: #zlib_zlib_byteswritten
845844
[Memory Usage Tuning]: #zlib_memory_usage_tuning
846845
[pool size]: cli.html#cli_uv_threadpool_size_size

tools/doc/type-parser.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ const customTypesMap = {
118118
'URL': 'url.html#url_the_whatwg_url_api',
119119
'URLSearchParams': 'url.html#url_class_urlsearchparams',
120120

121-
'MessagePort': 'worker_threads.html#worker_threads_class_messageport'
121+
'MessagePort': 'worker_threads.html#worker_threads_class_messageport',
122+
123+
'zlib options': 'zlib.html#zlib_class_options',
122124
};
123125

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

0 commit comments

Comments
 (0)