react native paper auto complete not working.

I've asked it here : https://github.com/callstack/react-native-paper/issues/1492
Also on stackoverflow still no answer after 20 days.The library comes with typescript but intellij doesn't recogonize that I also copied the types to @types folder (It's not standard just for testing) Now when I press ctrl + hover I get the .ts file but still no Autocompletion.

0
5 comments

Please can you elaborate on this? what doesn't work namely? Code snippets/screenshots that show up the issue would be helpful

0

When I press ctrl + space to get props of the component it says no suggestion.The props autocompletion is what that is not working.Thank you

0

The components are defined in rather unusual way in library typings... Like:

declare const _default: (React.ComponentClass<Pick<Props, "color" | "onPress" | "disabled" | "status" | "uncheckedColor"> & {
theme?: import("@callstack/react-theme-provider").$DeepPartial<Theme> | undefined;
}, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & typeof Checkbox) | (React.FunctionComponent<Props> & typeof Checkbox), {}>) | (React.FunctionComponent<Pick<Props, "color" | "onPress" | "disabled" | "status" | "uncheckedColor"> & {
theme?: import("@callstack/react-theme-provider").$DeepPartial<Theme> | undefined;
}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & typeof Checkbox) | (React.FunctionComponent<Props> & typeof Checkbox), {}>);
export default _default;

The IDE can't resolve props when using such definitions, they require special support.

0

I've created a request for this, please feel free to vote: https://youtrack.jetbrains.com/issue/WEB-43002

0

Thank you I voted it up.Here's some answer from the developers of react native paper:
They are generated by typescript compiler. Nothing unusual about them. They don't look pretty because they aren't hand written. Autocompletion works fine in VSCode with TypeScript language service with no special support.
link : https://github.com/callstack/react-native-paper/issues/1492

0

Please sign in to leave a comment.