Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e50e71

Browse files
authored
🤖 Merge PR#56551 fix(semver): toComparators returns string[][] by@snyamathi
* fix: toComparators returns string[]* add tests* Update semver-tests.ts
1 parente42c9a7 commit2e50e71

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎types/semver/ranges/to-comparators.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import semver = require('../index');
44
/**
55
* Mostly just for testing and legacy API reasons
66
*/
7-
declarefunctiontoComparators(range:string|Range,optionsOrLoose?:boolean|semver.Options):string;
7+
declarefunctiontoComparators(range:string|Range,optionsOrLoose?:boolean|semver.Options):string[][];
88

99
export=toComparators;

‎types/semver/semver-tests.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ semver.subset('1.x', '1.x'); // $ExpectType boolean
174174
semver.subset(newRange('1.2.3'),newRange('1.2.3'));// $ExpectType boolean
175175
semver.subset('^1.2.3-pre.0','1.x',{includePrerelease:true});// $ExpectType boolean
176176
semver.subset('','');// $ExpectType boolean
177+
semver.toComparators('1.x');// $ExpectType string[][]
178+
semver.toComparators(newRange('1.2.3'));// $ExpectType string[][]
177179

178180
// Coercion
179181
sem=semver.coerce(str);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp