react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Syntax error in ImageEditingExample.js for using 'type' for Objects

Open vinodsobale opened this issue 10 years ago • 4 comments

I am getting Syntax error for the following objects. I do hope they are objects.

  type ImageOffset = {
    x: 100;
    y: 100;
  };

  type ImageSize = {
    width: 100;
    height: 100;
  };

  type TransformData = {
    offset: ImageOffset;
    size: ImageSize;
  }

How do I fix this syntax error?

vinodsobale avatar Dec 22 '15 08:12 vinodsobale

Hey vinu123, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

facebook-github-bot avatar Dec 22 '15 08:12 facebook-github-bot

They are Flow type declarations. Babel supports stripping them out. Where are you getting syntax errors?

satya164 avatar Dec 22 '15 23:12 satya164

@facebook-github-bot answered

satya164 avatar Mar 20 '16 22:03 satya164

Closing this issue as @satya164 says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

facebook-github-bot avatar Mar 20 '16 22:03 facebook-github-bot