facebook

propTypes causes error in .js file

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #594316 Reply

    jburghes
    Participant

    I am using Proptypes in my React components like so:

    import PropTypes from ‘prop-types’;

    propTypes: {
    closeModal: React.PropTypes.func
    }

    Codemix marks an error on this line stating: “types can only be used in .ts files”

    How can I disable this error checking, or make my code compliant?

    #594318 Reply

    jburghes
    Participant

    Never mind, I realise I am using the wrong syntax

    #594338 Reply

    support-swapna
    Moderator

    jburghes,

    Glad that you figured it out. Thank you for getting back to us.
    Please let us know if you see any other issues.

    –Swapna
    Genuitec Support

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: propTypes causes error in .js file

You must be logged in to post in the forum log in