<commit_before>import assign from 'lodash/assign'
import { PropTypes } from 'react'

// Decorators to help declaring on React components without using the
// tedious static properties syntax.
//
// ```js
// @propTypes({
//   children: propTypes.node.isRequired
// })
// class MyComponent extends React.Component {}
// ```
const propTypes = types => target => {
  target.propTypes = {
    ...target.propTypes,
    ...types
  }

  return target
}
assign(propTypes, PropTypes)
export { propTypes as default }<commit_msg>feat(prop-types): can also be used to set context types<commit_after>import assign from 'lodash/assign'
import { PropTypes } from 'react'

// Decorators to help declaring properties and context types on React
// components without using the tedious static properties syntax.
//
// ```js
// @propTypes({
//   children: propTypes.node.isRequired
// }, {
//   store: propTypes.object.isRequired
// })
// class MyComponent extends React.Component {}
// ```
const propTypes = (propTypes, contextTypes) => target => {
  if (propTypes !== undefined) {
    target.propTypes = {
      ...target.propTypes,
      ...propTypes
    }
  }
  if (contextTypes !== undefined) {
    target.contextTypes = {
      ...target.contextTypes,
      ...contextTypes
    }
  }

  return target
}
assign(propTypes, PropTypes)

export { propTypes as default }
{'fraction_non_alphanumeric': 0.1356560415122313, 'fraction_numerical': 0.0, 'mean_word_length': 3.1411042944785277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2453874', 'n_tokens_mistral': 388, 'n_tokens_neox': 385, 'n_words': 114}