microsoft/TypeScript-React-Native-Starter

no code hint to use StyleSheet.create

Joey-Huang opened this issue · 1 comments

There is no code hint to use this method(use webstrom ide)

const styles = StyleSheet.create({
root: {
alignItems: "center",
alignSelf: "center"
}
});

hope when write 'a', a code prompt appears. [alignSelf....all start with 'a' ]

maybe you can try to do something similar to this

interface Style {
  main: ViewStyle;
  closeButton: ViewStyle;
  closeText: TextStyle;
}

const styles = StyleSheet.create<Style>({
  main: {
    flex: 1,
    ...,
  },
  closeButton: {
    textAlign: 'center',
    zIndex: 3,
    ...,
  },
  closeText: {
    fontSize: 48,
    ...,
  },
});