From 53cdad917ba6ca6a3ce350d44c3854248e0ea933 Mon Sep 17 00:00:00 2001 From: Daniel Stockman <5605+evocateur@users.noreply.github.com> Date: Wed, 9 Dec 2020 12:04:17 -0800 Subject: [PATCH] feat(prerelease-id-from-version): Add JSDoc types --- .../lib/prerelease-id-from-version.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/prerelease-id-from-version/lib/prerelease-id-from-version.js b/utils/prerelease-id-from-version/lib/prerelease-id-from-version.js index cc988d7aff..b53ef12526 100644 --- a/utils/prerelease-id-from-version/lib/prerelease-id-from-version.js +++ b/utils/prerelease-id-from-version/lib/prerelease-id-from-version.js @@ -4,6 +4,10 @@ const semver = require("semver"); module.exports.prereleaseIdFromVersion = prereleaseIdFromVersion; +/** + * @param {string} version + * @returns {string|undefined} + */ function prereleaseIdFromVersion(version) { return (semver.prerelease(version) || []).shift(); }