mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
fix: support semver.inc() with 3 args (#38130)
fix: support semver.inc() with 3 args fix: support semver.inc() with 3 args
This commit is contained in:
committed by
Andrew Casey
parent
aff2133a93
commit
ac9feceeb3
Vendored
+5
@@ -31,6 +31,11 @@ export function clean(version: string, optionsOrLoose?: boolean | Options): stri
|
||||
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
|
||||
*/
|
||||
export function inc(v: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null;
|
||||
export function inc(
|
||||
v: string | SemVer,
|
||||
release: ReleaseType,
|
||||
identifier?: string,
|
||||
): string | null;
|
||||
/**
|
||||
* Return the major version number.
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,7 @@ strn = semver.inc(str, "patch", loose);
|
||||
strn = semver.inc(str, "prepatch", loose);
|
||||
strn = semver.inc(str, "prerelease", loose);
|
||||
strn = semver.inc(str, "prerelease", loose, "alpha");
|
||||
strn = semver.inc(str, 'prerelease', 'beta');
|
||||
num = semver.major(str, loose);
|
||||
num = semver.minor(str, loose);
|
||||
num = semver.patch(str, loose);
|
||||
|
||||
Reference in New Issue
Block a user