computerjazz / react-native-infinite-pager

An infinitely-swipeable pager component.
MIT License
172 stars 16 forks source link

Type Error: error TS2322 `react-native-infinite-pager/src/index.tsx` #34

Open FlandiaYingman opened 1 month ago

FlandiaYingman commented 1 month ago
node_modules/react-native-infinite-pager/src/index.tsx:538:17 - error TS2322: Type 'InfinitePagerPageComponent | MemoExoticComponent<InfinitePagerPageComponent> | undefined' is not assignable to type 'InfinitePagerPageComponent | undefined'.   
  Type 'MemoExoticComponent<InfinitePagerPageComponent>' is not assignable to type 'InfinitePagerPageComponent | undefined'.
    Type 'MemoExoticComponent<InfinitePagerPageComponent>' is not assignable to type 'InfinitePagerPageComponent'.
      Type 'ReactNode' is not assignable to type 'Element | null'.
        Type 'undefined' is not assignable to type 'Element | null'.

538                 PageComponent={PageComponent}
                    ~~~~~~~~~~~~~

  node_modules/react-native-infinite-pager/src/index.tsx:560:3
    560   PageComponent?: InfinitePagerPageComponent;
          ~~~~~~~~~~~~~
    The expected type comes from property 'PageComponent' which is declared here on type 'IntrinsicAttributes & PageWrapperProps'
camarm-dev commented 2 weeks ago

Same issue. tsc outputs the same error.