-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript Support #7
Comments
Thanks a lot, @emech-en! There's no reason not to! The only issue is, I have very limited experience using TypeScript, so I wouldn't be best suited to perform the migration. I'd be more than happy to accept a Pull Request for TypeScript support, though. It would be especially useful for me to see how a component I'm familiar with gets transformed into the TS equivalent. Do you think you'd be up to it? |
Hello, Here is it:
declare module 'react-native-twitter-textview' {
import {FC} from 'react';
import {GestureResponderEvent, TextStyle, ViewProps} from 'react-native';
export interface ReactNativeTwitterTextviewProps extends Omit<ViewProps, 'children'>{
children?: string | never[];
extractHashtags?: boolean;
extractMentions?: boolean;
extractLinks?: boolean;
extractEmails?: boolean;
onPressHashtag?: (e: GestureResponderEvent, hashtag: string) => void;
onPressMention?: (e: GestureResponderEvent, mention: string) => void;
onPressLink?: (e: GestureResponderEvent, link: string) => string | void;
onPressEmail?: (e: GestureResponderEvent, email: string) => string | void;
hashtagStyle?: TextStyle;
mentionStyle?: TextStyle;
linkStyle?: TextStyle;
emailStyle?: TextStyle;
}
const ReactNativeTwitterTextView: FC<ReactNativeTwitterTextviewProps>;
export default ReactNativeTwitterTextView;
} Have a great day. |
Instead |
Great Component! Do you plan to support typescript?
The text was updated successfully, but these errors were encountered: