propTypes.ts 589 B

12345678910111213141516171819202122232425
  1. import { VueTypeValidableDef, VueTypesInterface, createTypes, toValidableType } from 'vue-types'
  2. import { CSSProperties } from 'vue'
  3. type PropTypes = VueTypesInterface & {
  4. readonly style: VueTypeValidableDef<CSSProperties>
  5. }
  6. const newPropTypes = createTypes({
  7. func: undefined,
  8. bool: undefined,
  9. string: undefined,
  10. number: undefined,
  11. object: undefined,
  12. integer: undefined
  13. }) as PropTypes
  14. class propTypes extends newPropTypes {
  15. static Function: any
  16. static get style() {
  17. return toValidableType('style', {
  18. type: [String, Object]
  19. })
  20. }
  21. }
  22. export { propTypes }