react-native-web-refresh-control icon indicating copy to clipboard operation
react-native-web-refresh-control copied to clipboard

[Enhancement]: TypeScript Support

Open ArnieGA opened this issue 1 year ago • 4 comments

Hi:

Just a simple feature request for TypeScript support.

Thanks.

ArnieGA avatar Mar 08 '24 14:03 ArnieGA

Hi Arnie!

Thanks for the suggestion. I agree that I should add types, but don't really have an usecase for this package anyways so it probably won't happen too soon. If someone were to make a PR I would hapilly review and merge it

NiciusB avatar Mar 10 '24 12:03 NiciusB

Can I contribute to this package and add types?

landonwjohnson avatar Apr 05 '24 20:04 landonwjohnson

@landonwjohnson sure!

NiciusB avatar Apr 07 '24 12:04 NiciusB

I was able to get TypeScript typing support working with the following code:

declare module "react-native-web-refresh-control" {
  export {
    RefreshControl,
    RefreshControlProps,
    RefreshControlPropsAndroid,
    RefreshControlPropsIOS,
  } from "react-native";
  export function patchFlatListProps(props: RefreshControlProps): void;
}

jerone avatar May 14 '24 15:05 jerone