Skip to content

Commit 0c927c7

Browse files
committed
Auto-generated commit
1 parent 2aca9d2 commit 0c927c7

File tree

4 files changed

+280
-6
lines changed

4 files changed

+280
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-12-21)
7+
## Unreleased (2025-12-22)
88

99
<section class="features">
1010

@@ -3525,6 +3525,7 @@ A total of 559 issues were closed in this release:
35253525

35263526
<details>
35273527

3528+
- [`61046bb`](https://github.com/stdlib-js/stdlib/commit/61046bb1c95923825493592bf78808fa1b18abc5) - **test:** add missing TypeScript declaration tests _(by Philipp Burckhardt)_
35283529
- [`595918c`](https://github.com/stdlib-js/stdlib/commit/595918c57777524dd8533b80a429c7d331f87444) - **feat:** add `stats/strided/midrange` [(#9298)](https://github.com/stdlib-js/stdlib/pull/9298) _(by Sachin Pangal, Athan Reines)_
35293530
- [`f839e6d`](https://github.com/stdlib-js/stdlib/commit/f839e6d90b2b7854450c4abcb8af04b01cb60225) - **chore:** fix C lint errors [(#9282)](https://github.com/stdlib-js/stdlib/pull/9282) _(by Rohit R Bhat)_
35303531
- [`ee22a7f`](https://github.com/stdlib-js/stdlib/commit/ee22a7f42d7a8733c2ae503a4085a942de386983) - **docs:** replace manual `for` loop in examples [(#9057)](https://github.com/stdlib-js/stdlib/pull/9057) _(by Harsh Yadav)_

base/ztest/one-sample/results/factory/docs/types/test.ts

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,121 @@ import resultsFactory = require( './index' );
5353
const r3 = new Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct<Float64Array>
5454
}
5555

56-
// TODO: add individual parameter tests
56+
// The returned constructor can be invoked without `new`...
57+
{
58+
const Results = resultsFactory( 'float64' );
59+
60+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
61+
const r1 = Results( new ArrayBuffer( 80 ) ); // $ExpectType ResultsStruct<Float64Array>
62+
63+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
64+
const r2 = Results( new ArrayBuffer( 80 ), 8 ); // $ExpectType ResultsStruct<Float64Array>
65+
66+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
67+
const r3 = Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct<Float64Array>
68+
}
69+
70+
// The results object has the expected properties (float64)...
71+
{
72+
const Results = resultsFactory( 'float64' );
73+
const r = new Results( {} );
74+
75+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
76+
r.rejected; // $ExpectType boolean
77+
78+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
79+
r.alternative; // $ExpectType Alternative
80+
81+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
82+
r.alpha; // $ExpectType number
83+
84+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
85+
r.pValue; // $ExpectType number
86+
87+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
88+
r.statistic; // $ExpectType number
89+
90+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
91+
r.ci; // $ExpectType Float64Array
92+
93+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
94+
r.nullValue; // $ExpectType number
95+
96+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
97+
r.sd; // $ExpectType number
98+
99+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
100+
r.method; // $ExpectType string
101+
}
102+
103+
// The results object has the expected properties (float32)...
104+
{
105+
const Results = resultsFactory( 'float32' );
106+
const r = new Results( {} );
107+
108+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
109+
r.rejected; // $ExpectType boolean
110+
111+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
112+
r.alternative; // $ExpectType Alternative
113+
114+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
115+
r.alpha; // $ExpectType number
116+
117+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
118+
r.pValue; // $ExpectType number
119+
120+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
121+
r.statistic; // $ExpectType number
122+
123+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
124+
r.ci; // $ExpectType Float32Array
125+
126+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
127+
r.nullValue; // $ExpectType number
128+
129+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
130+
r.sd; // $ExpectType number
131+
132+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
133+
r.method; // $ExpectType string
134+
}
135+
136+
// The compiler throws an error if the constructor is provided a first argument which is not an ArrayBuffer or object...
137+
{
138+
const Results = resultsFactory( 'float64' );
139+
140+
new Results( 'abc' ); // $ExpectError
141+
new Results( 123 ); // $ExpectError
142+
new Results( true ); // $ExpectError
143+
new Results( false ); // $ExpectError
144+
new Results( null ); // $ExpectError
145+
new Results( [] ); // $ExpectError
146+
new Results( ( x: number ): number => x ); // $ExpectError
147+
}
148+
149+
// The compiler throws an error if the constructor is provided a second argument which is not a number...
150+
{
151+
const Results = resultsFactory( 'float64' );
152+
153+
new Results( new ArrayBuffer( 80 ), 'abc' ); // $ExpectError
154+
new Results( new ArrayBuffer( 80 ), true ); // $ExpectError
155+
new Results( new ArrayBuffer( 80 ), false ); // $ExpectError
156+
new Results( new ArrayBuffer( 80 ), null ); // $ExpectError
157+
new Results( new ArrayBuffer( 80 ), [] ); // $ExpectError
158+
new Results( new ArrayBuffer( 80 ), {} ); // $ExpectError
159+
new Results( new ArrayBuffer( 80 ), ( x: number ): number => x ); // $ExpectError
160+
}
161+
162+
// The compiler throws an error if the constructor is provided a third argument which is not a number...
163+
{
164+
const Results = resultsFactory( 'float64' );
165+
166+
new Results( new ArrayBuffer( 80 ), 8, 'abc' ); // $ExpectError
167+
new Results( new ArrayBuffer( 80 ), 8, true ); // $ExpectError
168+
new Results( new ArrayBuffer( 80 ), 8, false ); // $ExpectError
169+
new Results( new ArrayBuffer( 80 ), 8, null ); // $ExpectError
170+
new Results( new ArrayBuffer( 80 ), 8, [] ); // $ExpectError
171+
new Results( new ArrayBuffer( 80 ), 8, {} ); // $ExpectError
172+
new Results( new ArrayBuffer( 80 ), 8, ( x: number ): number => x ); // $ExpectError
173+
}

base/ztest/one-sample/results/float32/docs/types/test.ts

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Results = require( './index' );
2121

2222
// TESTS //
2323

24-
// The function returns a results object...
24+
// The constructor returns a results object...
2525
{
2626
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2727
const r0 = new Results( {} ); // $ExpectType ResultsStruct
@@ -36,4 +36,82 @@ import Results = require( './index' );
3636
const r3 = new Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct
3737
}
3838

39-
// TODO: add individual parameter tests
39+
// The constructor can be invoked without `new`...
40+
{
41+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
42+
const r0 = Results( {} ); // $ExpectType ResultsStruct
43+
44+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
45+
const r1 = Results( new ArrayBuffer( 80 ) ); // $ExpectType ResultsStruct
46+
47+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
48+
const r2 = Results( new ArrayBuffer( 80 ), 8 ); // $ExpectType ResultsStruct
49+
50+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
51+
const r3 = Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct
52+
}
53+
54+
// The results object has the expected properties...
55+
{
56+
const r = new Results( {} );
57+
58+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
59+
r.rejected; // $ExpectType boolean
60+
61+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
62+
r.alternative; // $ExpectType Alternative
63+
64+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
65+
r.alpha; // $ExpectType number
66+
67+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
68+
r.pValue; // $ExpectType number
69+
70+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
71+
r.statistic; // $ExpectType number
72+
73+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
74+
r.ci; // $ExpectType Float32Array
75+
76+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
77+
r.nullValue; // $ExpectType number
78+
79+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
80+
r.sd; // $ExpectType number
81+
82+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
83+
r.method; // $ExpectType string
84+
}
85+
86+
// The compiler throws an error if the constructor is provided a first argument which is not an ArrayBuffer or object...
87+
{
88+
new Results( 'abc' ); // $ExpectError
89+
new Results( 123 ); // $ExpectError
90+
new Results( true ); // $ExpectError
91+
new Results( false ); // $ExpectError
92+
new Results( null ); // $ExpectError
93+
new Results( [] ); // $ExpectError
94+
new Results( ( x: number ): number => x ); // $ExpectError
95+
}
96+
97+
// The compiler throws an error if the constructor is provided a second argument which is not a number...
98+
{
99+
new Results( new ArrayBuffer( 80 ), 'abc' ); // $ExpectError
100+
new Results( new ArrayBuffer( 80 ), true ); // $ExpectError
101+
new Results( new ArrayBuffer( 80 ), false ); // $ExpectError
102+
new Results( new ArrayBuffer( 80 ), null ); // $ExpectError
103+
new Results( new ArrayBuffer( 80 ), [] ); // $ExpectError
104+
new Results( new ArrayBuffer( 80 ), {} ); // $ExpectError
105+
new Results( new ArrayBuffer( 80 ), ( x: number ): number => x ); // $ExpectError
106+
}
107+
108+
// The compiler throws an error if the constructor is provided a third argument which is not a number...
109+
{
110+
new Results( new ArrayBuffer( 80 ), 8, 'abc' ); // $ExpectError
111+
new Results( new ArrayBuffer( 80 ), 8, true ); // $ExpectError
112+
new Results( new ArrayBuffer( 80 ), 8, false ); // $ExpectError
113+
new Results( new ArrayBuffer( 80 ), 8, null ); // $ExpectError
114+
new Results( new ArrayBuffer( 80 ), 8, [] ); // $ExpectError
115+
new Results( new ArrayBuffer( 80 ), 8, {} ); // $ExpectError
116+
new Results( new ArrayBuffer( 80 ), 8, ( x: number ): number => x ); // $ExpectError
117+
}

base/ztest/one-sample/results/float64/docs/types/test.ts

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Results = require( './index' );
2121

2222
// TESTS //
2323

24-
// The function returns a results object...
24+
// The constructor returns a results object...
2525
{
2626
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2727
const r0 = new Results( {} ); // $ExpectType ResultsStruct
@@ -36,4 +36,82 @@ import Results = require( './index' );
3636
const r3 = new Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct
3737
}
3838

39-
// TODO: add individual parameter tests
39+
// The constructor can be invoked without `new`...
40+
{
41+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
42+
const r0 = Results( {} ); // $ExpectType ResultsStruct
43+
44+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
45+
const r1 = Results( new ArrayBuffer( 80 ) ); // $ExpectType ResultsStruct
46+
47+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
48+
const r2 = Results( new ArrayBuffer( 80 ), 8 ); // $ExpectType ResultsStruct
49+
50+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
51+
const r3 = Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct
52+
}
53+
54+
// The results object has the expected properties...
55+
{
56+
const r = new Results( {} );
57+
58+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
59+
r.rejected; // $ExpectType boolean
60+
61+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
62+
r.alternative; // $ExpectType Alternative
63+
64+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
65+
r.alpha; // $ExpectType number
66+
67+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
68+
r.pValue; // $ExpectType number
69+
70+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
71+
r.statistic; // $ExpectType number
72+
73+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
74+
r.ci; // $ExpectType Float64Array
75+
76+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
77+
r.nullValue; // $ExpectType number
78+
79+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
80+
r.sd; // $ExpectType number
81+
82+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
83+
r.method; // $ExpectType string
84+
}
85+
86+
// The compiler throws an error if the constructor is provided a first argument which is not an ArrayBuffer or object...
87+
{
88+
new Results( 'abc' ); // $ExpectError
89+
new Results( 123 ); // $ExpectError
90+
new Results( true ); // $ExpectError
91+
new Results( false ); // $ExpectError
92+
new Results( null ); // $ExpectError
93+
new Results( [] ); // $ExpectError
94+
new Results( ( x: number ): number => x ); // $ExpectError
95+
}
96+
97+
// The compiler throws an error if the constructor is provided a second argument which is not a number...
98+
{
99+
new Results( new ArrayBuffer( 80 ), 'abc' ); // $ExpectError
100+
new Results( new ArrayBuffer( 80 ), true ); // $ExpectError
101+
new Results( new ArrayBuffer( 80 ), false ); // $ExpectError
102+
new Results( new ArrayBuffer( 80 ), null ); // $ExpectError
103+
new Results( new ArrayBuffer( 80 ), [] ); // $ExpectError
104+
new Results( new ArrayBuffer( 80 ), {} ); // $ExpectError
105+
new Results( new ArrayBuffer( 80 ), ( x: number ): number => x ); // $ExpectError
106+
}
107+
108+
// The compiler throws an error if the constructor is provided a third argument which is not a number...
109+
{
110+
new Results( new ArrayBuffer( 80 ), 8, 'abc' ); // $ExpectError
111+
new Results( new ArrayBuffer( 80 ), 8, true ); // $ExpectError
112+
new Results( new ArrayBuffer( 80 ), 8, false ); // $ExpectError
113+
new Results( new ArrayBuffer( 80 ), 8, null ); // $ExpectError
114+
new Results( new ArrayBuffer( 80 ), 8, [] ); // $ExpectError
115+
new Results( new ArrayBuffer( 80 ), 8, {} ); // $ExpectError
116+
new Results( new ArrayBuffer( 80 ), 8, ( x: number ): number => x ); // $ExpectError
117+
}

0 commit comments

Comments
 (0)