mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
lib: include return types in JSDoc
Add types to @returns JSDoc annotations where the type is missing. PR-URL: https://github.com/nodejs/node/pull/41130 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
66b5083c1e
commit
b191e66ddf
6 files changed
+7
-7
No files matched your search
@@ -129,7 +129,7 @@ class Blob {
|
||||
* endings? : string,
|
||||
* type? : string,
|
||||
* }} [options]
|
||||
* @returns
|
||||
* @constructs {Blob}
|
||||
*/
|
||||
constructor(sources = [], options = {}) {
|
||||
emitExperimentalWarning('buffer.Blob');
|
||||
|
||||
@@ -525,7 +525,7 @@ Stats.prototype._checkModeProperty = function(property) {
|
||||
/**
|
||||
* @param {Float64Array | BigUint64Array} stats
|
||||
* @param {number} offset
|
||||
* @returns
|
||||
* @returns {BigIntStats | Stats}
|
||||
*/
|
||||
function getStatsFromBinding(stats, offset = 0) {
|
||||
if (isBigUint64Array(stats)) {
|
||||
|
||||
@@ -588,7 +588,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath,
|
||||
* @param {Exports} exports
|
||||
* @param {URL} packageJSONUrl
|
||||
* @param {string | URL | undefined} base
|
||||
* @returns
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isConditionalExportsMainSugar(exports, packageJSONUrl, base) {
|
||||
if (typeof exports === 'string' || ArrayIsArray(exports)) return true;
|
||||
@@ -701,7 +701,7 @@ function patternKeyCompare(a, b) {
|
||||
* @param {string} name
|
||||
* @param {string | URL | undefined} base
|
||||
* @param {Set<string>} conditions
|
||||
* @returns
|
||||
* @returns {URL}
|
||||
*/
|
||||
function packageImportsResolve(name, base, conditions) {
|
||||
if (name === '#' || StringPrototypeStartsWith(name, '#/') ||
|
||||
|
||||
@@ -404,7 +404,7 @@ primordials.PromisePrototypeCatch = (thisPromise, onRejected) =>
|
||||
* @param {Promise<any>} thisPromise
|
||||
* @param {() => void) | undefined | null} onFinally The callback to execute
|
||||
* when the Promise is settled (fulfilled or rejected).
|
||||
* @returns A Promise for the completion of the callback.
|
||||
* @returns {Promise} A Promise for the completion of the callback.
|
||||
*/
|
||||
primordials.SafePromisePrototypeFinally = (thisPromise, onFinally) =>
|
||||
// Wrapping on a new Promise is necessary to not expose the SafePromise
|
||||
|
||||
@@ -578,7 +578,7 @@ function newReadableWritablePairFromDuplex(duplex) {
|
||||
* objectMode? : boolean,
|
||||
* signal? : AbortSignal,
|
||||
* }} [options]
|
||||
* @returns
|
||||
* @returns {Duplex}
|
||||
*/
|
||||
function newStreamDuplexFromReadableWritablePair(pair = {}, options = {}) {
|
||||
validateObject(pair, 'pair');
|
||||
|
||||
+1
-1
@@ -191,7 +191,7 @@ function stringifyPrimitive(v) {
|
||||
/**
|
||||
* @param {string | number | bigint | boolean} v
|
||||
* @param {(v: string) => string} encode
|
||||
* @returns
|
||||
* @returns {string}
|
||||
*/
|
||||
function encodeStringified(v, encode) {
|
||||
if (typeof v === 'string')
|
||||
|
||||
Reference in new issue
Block a user