Skip to content

Commit bc30678

Browse files
committed
chore: fix type errors in test modules
1 parent dbf4fc0 commit bc30678

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

targets/web/src/types/__tests__/useSpring.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77
SpringValue,
88
SpringValues,
99
SpringHandle,
10+
SpringStartFn,
1011
SpringStopFn,
1112
SpringUpdateFn,
12-
SpringsUpdateFn,
1313
AnimationResult,
1414
} from '../..';
1515

@@ -94,7 +94,7 @@ test('imperative mode (inferred)', () => {
9494
}));
9595

9696
assert(props, _ as SpringValues<State>);
97-
assert(update, _ as SpringsUpdateFn<State>);
97+
assert(update, _ as SpringStartFn<State>);
9898
assert(stop, _ as SpringStopFn<State>);
9999
});
100100

@@ -108,7 +108,7 @@ test('imperative mode', () => {
108108
}));
109109

110110
assert(props, _ as SpringValues<State>);
111-
assert(update, _ as SpringsUpdateFn<State>);
111+
assert(update, _ as SpringStartFn<State>);
112112
assert(stop, _ as SpringStopFn<State>);
113113

114114
test('update()', () => {

targets/web/src/types/__tests__/useSprings.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { assert, test, _ } from 'spec.ts';
22
import { useSprings, SpringStopFn } from '../..';
3-
import {
4-
Controller,
5-
ControllerProps,
6-
SpringsUpdateFn,
7-
SpringValues,
8-
} from 'core';
3+
import { Controller, ControllerProps, SpringStartFn, SpringValues } from 'core';
94

105
const items: string[] = [];
116

@@ -36,6 +31,6 @@ test('pass a function', () => {
3631
return _ as ControllerProps<State>;
3732
});
3833

39-
assert(set, _ as SpringsUpdateFn<State>);
34+
assert(set, _ as SpringStartFn<State>);
4035
assert(stop, _ as SpringStopFn<State>);
4136
});
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
import { assert, test, _ } from 'spec.ts';
2-
import { SpringValues, SpringsUpdateFn } from 'core';
2+
import { SpringValues, SpringStartFn } from 'core';
33
import { useTrail, SpringStopFn } from '../..';
44

55
test('basic usage', () => {
66
const springs = useTrail(3, { opacity: 1 });
7-
assert(springs, _ as Array<
8-
SpringValues<{
9-
opacity: number;
10-
}>
11-
>);
7+
assert(
8+
springs,
9+
_ as Array<
10+
SpringValues<{
11+
opacity: number;
12+
}>
13+
>
14+
);
1215
});
1316

1417
test('function argument', () => {
1518
const [springs, set, stop] = useTrail(3, () => ({ opacity: 1 }));
16-
assert(springs, _ as Array<
17-
SpringValues<{
19+
assert(
20+
springs,
21+
_ as Array<
22+
SpringValues<{
23+
opacity: number;
24+
}>
25+
>
26+
);
27+
assert(
28+
set,
29+
_ as SpringStartFn<{
1830
opacity: number;
1931
}>
20-
>);
21-
assert(set, _ as SpringsUpdateFn<{
22-
opacity: number;
23-
}>);
32+
);
2433
assert(stop, _ as SpringStopFn<{}>);
2534
});

0 commit comments

Comments
 (0)