how to convert javascript to typescript
import React, {Component} from 'react' import {ColorPropType, Text} from 'react-native' import { colors } from '../constants' const UIText = (props) => <Text {...props} style={[{ fontFamily: 'PatrickHand-Regular', color: colors.primary }, props.style]}>{props.children} </Text> export default UIText
convert javascript to typescript
1. Add tsconfig.json file to project 2. Integrate with a build tool 3. Change all .js files to .ts files 4. Check for any errors