@@ -7,18 +7,18 @@ const schema2: StandardSchemaV1<string, number> = null as any;
7
7
8
8
function query_tests ( ) {
9
9
const no_args : RemoteQueryFunction < void , string > = query ( ( ) => 'Hello world' ) ;
10
- no_args ( ) ;
10
+ void no_args ( ) ;
11
11
// @ts -expect-error
12
- no_args ( '' ) ;
12
+ void no_args ( '' ) ;
13
13
14
14
const one_arg : RemoteQueryFunction < number , string > = query ( 'unchecked' , ( a : number ) =>
15
15
a . toString ( )
16
16
) ;
17
- one_arg ( 1 ) ;
17
+ void one_arg ( 1 ) ;
18
18
// @ts -expect-error
19
- one_arg ( '1' ) ;
19
+ void one_arg ( '1' ) ;
20
20
// @ts -expect-error
21
- one_arg ( ) ;
21
+ void one_arg ( ) ;
22
22
23
23
async function query_without_args ( ) {
24
24
const q = query ( ( ) => 'Hello world' ) ;
@@ -28,52 +28,52 @@ function query_tests() {
28
28
const wrong : number = await q ( ) ;
29
29
wrong ;
30
30
// @ts -expect-error
31
- q ( 1 ) ;
31
+ void q ( 1 ) ;
32
32
// @ts -expect-error
33
- query ( ( a : string ) => 'hi' ) ;
33
+ query ( ( _ : string ) => 'hi' ) ;
34
34
}
35
- query_without_args ( ) ;
35
+ void query_without_args ( ) ;
36
36
37
37
async function query_unsafe ( ) {
38
38
const q = query ( 'unchecked' , ( a : number ) => a ) ;
39
39
const result : number = await q ( 1 ) ;
40
40
result ;
41
41
// @ts -expect-error
42
- q ( 1 , 2 , 3 ) ;
42
+ void q ( 1 , 2 , 3 ) ;
43
43
// @ts -expect-error
44
- q ( '1' , '2' ) ;
44
+ void q ( '1' , '2' ) ;
45
45
}
46
- query_unsafe ( ) ;
46
+ void query_unsafe ( ) ;
47
47
48
- async function query_schema ( ) {
48
+ async function query_schema_input_only ( ) {
49
49
const q = query ( schema , ( a ) => a ) ;
50
50
const result : string = await q ( '1' ) ;
51
51
result ;
52
52
}
53
- query_schema ( ) ;
53
+ void query_schema_input_only ( ) ;
54
54
55
- async function query_schema_type ( ) {
55
+ async function query_schema_input_and_output ( ) {
56
56
const q = query ( schema2 , ( a ) => a ) ;
57
57
const result : number = await q ( '1' ) ;
58
58
result ;
59
59
}
60
- query_schema_type ( ) ;
60
+ void query_schema_input_and_output ( ) ;
61
61
}
62
62
query_tests ( ) ;
63
63
64
64
function prerender_tests ( ) {
65
65
const no_args : RemotePrerenderFunction < void , string > = prerender ( ( ) => 'Hello world' ) ;
66
- no_args ( ) ;
66
+ void no_args ( ) ;
67
67
// @ts -expect-error
68
- no_args ( '' ) ;
68
+ void no_args ( '' ) ;
69
69
const one_arg : RemotePrerenderFunction < number , string > = prerender ( 'unchecked' , ( a : number ) =>
70
70
a . toString ( )
71
71
) ;
72
- one_arg ( 1 ) ;
72
+ void one_arg ( 1 ) ;
73
73
// @ts -expect-error
74
- one_arg ( '1' ) ;
74
+ void one_arg ( '1' ) ;
75
75
// @ts -expect-error
76
- one_arg ( ) ;
76
+ void one_arg ( ) ;
77
77
78
78
async function prerender_without_args ( ) {
79
79
const q = prerender ( ( ) => 'Hello world' ) ;
@@ -83,31 +83,31 @@ function prerender_tests() {
83
83
const wrong : number = await q ( ) ;
84
84
wrong ;
85
85
// @ts -expect-error
86
- q ( 1 ) ;
86
+ void q ( 1 ) ;
87
87
// @ts -expect-error
88
- query ( ( a : string ) => 'hi' ) ;
88
+ query ( ( _ : string ) => 'hi' ) ;
89
89
}
90
- prerender_without_args ( ) ;
90
+ void prerender_without_args ( ) ;
91
91
92
92
async function prerender_unsafe ( ) {
93
93
const q = prerender ( 'unchecked' , ( a : number ) => a ) ;
94
94
const result : number = await q ( 1 ) ;
95
95
result ;
96
96
// @ts -expect-error
97
- q ( 1 , 2 , 3 ) ;
97
+ void q ( 1 , 2 , 3 ) ;
98
98
// @ts -expect-error
99
- q ( '1' , '2' ) ;
99
+ void q ( '1' , '2' ) ;
100
100
}
101
- prerender_unsafe ( ) ;
101
+ void prerender_unsafe ( ) ;
102
102
103
103
async function prerender_schema ( ) {
104
104
const q = prerender ( schema , ( a ) => a ) ;
105
105
const result : string = await q ( '1' ) ;
106
106
result ;
107
107
}
108
- prerender_schema ( ) ;
108
+ void prerender_schema ( ) ;
109
109
110
- async function prerender_schema_entries ( ) {
110
+ function prerender_schema_entries ( ) {
111
111
const q = prerender ( schema , ( a ) => a , { inputs : ( ) => [ '1' ] } ) ;
112
112
q ;
113
113
// @ts -expect-error
@@ -133,31 +133,31 @@ function command_tests() {
133
133
const wrong : number = await cmd ( ) ;
134
134
wrong ;
135
135
}
136
- command_without_args ( ) ;
136
+ void command_without_args ( ) ;
137
137
138
138
async function command_unsafe ( ) {
139
139
const cmd = command ( 'unchecked' , ( a : string ) => a ) ;
140
140
const result : string = await cmd ( 'test' ) ;
141
141
result ;
142
142
// @ts -expect-error
143
- cmd ( 1 ) ;
143
+ void cmd ( 1 ) ;
144
144
// @ts -expect-error
145
- cmd ( '1' , 2 ) ;
145
+ void cmd ( '1' , 2 ) ;
146
146
}
147
- command_unsafe ( ) ;
147
+ void command_unsafe ( ) ;
148
148
149
149
async function command_schema ( ) {
150
150
const cmd = command ( schema , ( a ) => a ) ;
151
151
const result : string = await cmd ( 'foo' ) ;
152
152
result ;
153
153
// @ts -expect-error
154
- cmd ( 123 ) ;
154
+ void cmd ( 123 ) ;
155
155
}
156
- command_schema ( ) ;
156
+ void command_schema ( ) ;
157
157
}
158
158
command_tests ( ) ;
159
159
160
- async function form_tests ( ) {
160
+ function form_tests ( ) {
161
161
const q = query ( ( ) => '' ) ;
162
162
const f = form ( ( f ) => {
163
163
f . get ( '' ) ;
0 commit comments