doc: add missing options.info for ZstdOptions

Source code of `class Zstd` calls ctor of parent `ZlibBase` via
`super()`

By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is
further used to determine the return shapes of `*Sync()` methods in
children class. This information will need to be revealed in nodejs doc.

This PR is separated from the one for `BrotliOptions`, since these two
changes potentially need to be backported to different minimum versions.

PR-URL: https://github.com/nodejs/node/pull/58360
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Jimmy Leung 2025-05-29 02:44:51 +08:00 committed by GitHub
parent e71a3cebf5
commit d5345b6da9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1069,6 +1069,7 @@ Each Zstd-based class takes an `options` object. All options are optional.
* `params` {Object} Key-value object containing indexed [Zstd parameters][].
* `maxOutputLength` {integer} Limits output size when using
[convenience methods][]. **Default:** [`buffer.kMaxLength`][]
* `info` {boolean} If `true`, returns an object with `buffer` and `engine`. **Default:** `false`
For example: