You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

37 lines
962 B

import type { CSSProperties, VNodeChild } from 'vue'
import type { VueTypeValidableDef, VueTypesInterface } from 'vue-types'
import { createTypes, toValidableType } from 'vue-types'
2 years ago
export type VueNode = VNodeChild | JSX.Element
type PropTypes = VueTypesInterface & {
readonly style: VueTypeValidableDef<CSSProperties>
readonly VNodeChild: VueTypeValidableDef<VueNode>
// readonly trueBool: VueTypeValidableDef<boolean>;
}
const newPropTypes = createTypes({
2 years ago
func: undefined,
bool: undefined,
string: undefined,
number: undefined,
object: undefined,
integer: undefined,
2 years ago
}) as PropTypes
class propTypes extends newPropTypes {
// a native-like validator that supports the `.validable` method
static override get style() {
return toValidableType('style', {
type: [String, Object],
})
}
static override get VNodeChild() {
return toValidableType('VNodeChild', {
type: undefined,
})
}
}
2 years ago
export { propTypes }