Skip to content

Commit 4c3fdb8

Browse files
Fix typecheck
1 parent e5da6a1 commit 4c3fdb8

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/testing.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
run: |
3535
yarn install --immutable --check-cache
3636
37+
- name: Run Typecheck
38+
run: yarn typecheck
39+
3740
- name: Run ESLint
3841
continue-on-error: true
3942
id: eslint
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
diff --git a/node_modules/react-native-paper-dates/src/Date/Swiper.tsx b/node_modules/react-native-paper-dates/src/Date/Swiper.tsx
2+
index 08c47c1..bdd49b5 100644
3+
--- a/node_modules/react-native-paper-dates/src/Date/Swiper.tsx
4+
+++ b/node_modules/react-native-paper-dates/src/Date/Swiper.tsx
5+
@@ -21,6 +21,7 @@ import React, {
6+
import { sharedStyles } from '../shared/styles'
7+
8+
const useIsomorphicLayoutEffect =
9+
+// @ts-ignore
10+
typeof window !== 'undefined' ? useLayoutEffect : useEffect
11+
12+
function Swiper({
13+
@@ -120,6 +121,7 @@ function VerticalScroller({
14+
const top =
15+
getVerticalMonthsOffset(idx.current, startWeekOnMonday) - montHeaderHeight
16+
17+
+ // @ts-ignore
18+
element.scrollTo({
19+
top,
20+
})
21+
@@ -129,6 +131,7 @@ function VerticalScroller({
22+
23+
const onScroll = useCallback(
24+
(e: UIEvent) => {
25+
+ // @ts-ignore
26+
const top = e.currentTarget?.scrollTop
27+
if (top === 0) {
28+
return
29+
@@ -206,6 +209,7 @@ export function useDebouncedCallback(callback: any): any {
30+
return () => {
31+
mounted.current = false
32+
if (timerId.current) {
33+
+ // @ts-ignore
34+
window.cancelAnimationFrame(timerId.current)
35+
}
36+
}
37+
@@ -214,8 +218,10 @@ export function useDebouncedCallback(callback: any): any {
38+
return useCallback(
39+
(args: any) => {
40+
if (timerId.current) {
41+
+ // @ts-ignore
42+
window.cancelAnimationFrame(timerId.current)
43+
}
44+
+ // @ts-ignore
45+
timerId.current = window.requestAnimationFrame(function () {
46+
if (mounted.current) {
47+
latest.current(args)

0 commit comments

Comments
 (0)