propTypes causes error in .js file CodeMix & Angular IDE > Getting Help This topic has 2 replies, 2 voices, and was last updated 6 years, 3 months ago by support-swapna. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts July 26, 2018 at 12:48 pm #594316 Reply jburghesParticipant 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? July 26, 2018 at 1:00 pm #594318 Reply jburghesParticipant Never mind, I realise I am using the wrong syntax July 27, 2018 at 2:21 am #594338 Reply support-swapnaModerator 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 Author Posts 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