Skip to content

Commit 35061eb

Browse files
committed
Resolve remaining linter issues
1 parent cab6a7e commit 35061eb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/TextLoop.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ type Props = {
2222
mask: boolean;
2323
noWrap: boolean;
2424
className?: string;
25-
onChange?: Function;
25+
onChange?: (state: {
26+
currentWordIndex: number;
27+
currentEl: ReactNode;
28+
wordCount: number;
29+
currentInterval: number;
30+
}) => void;
2631
};
2732

2833
type State = {

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export const requestTimeout = (fn, delay: number): RequestTimeout => {
1515
const delta = current - start;
1616

1717
if (delta >= delay) {
18-
return fn.call(null);
18+
fn.call(null);
19+
return;
1920
}
2021
handle.value = window.requestAnimationFrame(loop);
2122
}

0 commit comments

Comments
 (0)