propTypes.ts 796 B

1234567891011121314151617181920212223242526272829303132333435
  1. import type { CSSProperties, VNodeChild } from 'vue';
  2. import type { VueTypeValidableDef, VueTypesInterface } from 'vue-types';
  3. import { createTypes } from 'vue-types';
  4. import type { JSX } from 'vue/jsx-runtime';
  5. export type VueNode = VNodeChild | JSX.Element;
  6. type PropTypes = VueTypesInterface & {
  7. readonly style: VueTypeValidableDef<CSSProperties>;
  8. readonly VNodeChild: VueTypeValidableDef<VueNode>;
  9. };
  10. const propTypes = createTypes({
  11. func: undefined,
  12. bool: undefined,
  13. string: undefined,
  14. number: undefined,
  15. object: undefined,
  16. integer: undefined
  17. }) as PropTypes;
  18. propTypes.extend([
  19. {
  20. name: 'style',
  21. getter: true,
  22. type: [String, Object],
  23. default: undefined
  24. },
  25. {
  26. name: 'VNodeChild',
  27. getter: true,
  28. type: undefined
  29. }
  30. ]);
  31. export { propTypes };