first commit

This commit is contained in:
湛兮
2026-05-26 11:14:37 +08:00
commit 88d4578600
214 changed files with 25313 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import type { CSSProperties, VNodeChild } from "vue";
import {
createTypes,
toValidableType,
type VueTypesInterface,
type VueTypeValidableDef
} from "vue-types";
export type VueNode = VNodeChild | JSX.Element;
type PropTypes = VueTypesInterface & {
readonly style: VueTypeValidableDef<CSSProperties>;
readonly VNodeChild: VueTypeValidableDef<VueNode>;
};
const newPropTypes = createTypes({
func: undefined,
bool: undefined,
string: undefined,
number: undefined,
object: undefined,
integer: undefined
}) as PropTypes;
// 从 vue-types v5.0 开始,extend()方法已经废弃,当前已改为官方推荐的ES6+方法 https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
export default class propTypes extends newPropTypes {
// a native-like validator that supports the `.validable` method
static get style() {
return toValidableType("style", {
type: [String, Object]
});
}
static get VNodeChild() {
return toValidableType("VNodeChild", {
type: undefined
});
}
}