Skip to content

Commit ccdfe97

Browse files
committed
get rid of errors
1 parent cfb2baf commit ccdfe97

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

packages/kit/test/types/remote.test.ts

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ const schema2: StandardSchemaV1<string, number> = null as any;
77

88
function query_tests() {
99
const no_args: RemoteQueryFunction<void, string> = query(() => 'Hello world');
10-
no_args();
10+
void no_args();
1111
// @ts-expect-error
12-
no_args('');
12+
void no_args('');
1313

1414
const one_arg: RemoteQueryFunction<number, string> = query('unchecked', (a: number) =>
1515
a.toString()
1616
);
17-
one_arg(1);
17+
void one_arg(1);
1818
// @ts-expect-error
19-
one_arg('1');
19+
void one_arg('1');
2020
// @ts-expect-error
21-
one_arg();
21+
void one_arg();
2222

2323
async function query_without_args() {
2424
const q = query(() => 'Hello world');
@@ -28,52 +28,52 @@ function query_tests() {
2828
const wrong: number = await q();
2929
wrong;
3030
// @ts-expect-error
31-
q(1);
31+
void q(1);
3232
// @ts-expect-error
33-
query((a: string) => 'hi');
33+
query((_: string) => 'hi');
3434
}
35-
query_without_args();
35+
void query_without_args();
3636

3737
async function query_unsafe() {
3838
const q = query('unchecked', (a: number) => a);
3939
const result: number = await q(1);
4040
result;
4141
// @ts-expect-error
42-
q(1, 2, 3);
42+
void q(1, 2, 3);
4343
// @ts-expect-error
44-
q('1', '2');
44+
void q('1', '2');
4545
}
46-
query_unsafe();
46+
void query_unsafe();
4747

48-
async function query_schema() {
48+
async function query_schema_input_only() {
4949
const q = query(schema, (a) => a);
5050
const result: string = await q('1');
5151
result;
5252
}
53-
query_schema();
53+
void query_schema_input_only();
5454

55-
async function query_schema_type() {
55+
async function query_schema_input_and_output() {
5656
const q = query(schema2, (a) => a);
5757
const result: number = await q('1');
5858
result;
5959
}
60-
query_schema_type();
60+
void query_schema_input_and_output();
6161
}
6262
query_tests();
6363

6464
function prerender_tests() {
6565
const no_args: RemotePrerenderFunction<void, string> = prerender(() => 'Hello world');
66-
no_args();
66+
void no_args();
6767
// @ts-expect-error
68-
no_args('');
68+
void no_args('');
6969
const one_arg: RemotePrerenderFunction<number, string> = prerender('unchecked', (a: number) =>
7070
a.toString()
7171
);
72-
one_arg(1);
72+
void one_arg(1);
7373
// @ts-expect-error
74-
one_arg('1');
74+
void one_arg('1');
7575
// @ts-expect-error
76-
one_arg();
76+
void one_arg();
7777

7878
async function prerender_without_args() {
7979
const q = prerender(() => 'Hello world');
@@ -83,31 +83,31 @@ function prerender_tests() {
8383
const wrong: number = await q();
8484
wrong;
8585
// @ts-expect-error
86-
q(1);
86+
void q(1);
8787
// @ts-expect-error
88-
query((a: string) => 'hi');
88+
query((_: string) => 'hi');
8989
}
90-
prerender_without_args();
90+
void prerender_without_args();
9191

9292
async function prerender_unsafe() {
9393
const q = prerender('unchecked', (a: number) => a);
9494
const result: number = await q(1);
9595
result;
9696
// @ts-expect-error
97-
q(1, 2, 3);
97+
void q(1, 2, 3);
9898
// @ts-expect-error
99-
q('1', '2');
99+
void q('1', '2');
100100
}
101-
prerender_unsafe();
101+
void prerender_unsafe();
102102

103103
async function prerender_schema() {
104104
const q = prerender(schema, (a) => a);
105105
const result: string = await q('1');
106106
result;
107107
}
108-
prerender_schema();
108+
void prerender_schema();
109109

110-
async function prerender_schema_entries() {
110+
function prerender_schema_entries() {
111111
const q = prerender(schema, (a) => a, { inputs: () => ['1'] });
112112
q;
113113
// @ts-expect-error
@@ -133,31 +133,31 @@ function command_tests() {
133133
const wrong: number = await cmd();
134134
wrong;
135135
}
136-
command_without_args();
136+
void command_without_args();
137137

138138
async function command_unsafe() {
139139
const cmd = command('unchecked', (a: string) => a);
140140
const result: string = await cmd('test');
141141
result;
142142
// @ts-expect-error
143-
cmd(1);
143+
void cmd(1);
144144
// @ts-expect-error
145-
cmd('1', 2);
145+
void cmd('1', 2);
146146
}
147-
command_unsafe();
147+
void command_unsafe();
148148

149149
async function command_schema() {
150150
const cmd = command(schema, (a) => a);
151151
const result: string = await cmd('foo');
152152
result;
153153
// @ts-expect-error
154-
cmd(123);
154+
void cmd(123);
155155
}
156-
command_schema();
156+
void command_schema();
157157
}
158158
command_tests();
159159

160-
async function form_tests() {
160+
function form_tests() {
161161
const q = query(() => '');
162162
const f = form((f) => {
163163
f.get('');

0 commit comments

Comments
 (0)