propTypes.ts 620 B

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