This commit is contained in:
2026-05-19 11:51:58 +08:00
parent 8d73b5e02c
commit 53b269e68a
501 changed files with 80205 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// export type IModel<T> = {
// [P in keyof T]: T[P] extends Function
// ? '❌此处不能定义任何方法'
// : (
// T[P] extends Array<infer R>
// ? (
// R extends Function
// ? '❌此处不能定义任何方法'
// : T[P]
// )
// : T[P] // IModel<T[P]> 性能消耗大
// );
// };
// export type IStore<T> = {
// [P in keyof T]: T[P] extends Function
// ? T[P]
// : (
// T[P] extends Array<infer R>
// ? (
// R extends Function
// ? '❌此处不能定义任何方法'
// : IModel<T[P]>
// )
// : IModel<T[P]>
// );
// };
export type IModel<T> = {
[P in keyof T]: T[P] extends Function
? '❌此处不能定义任何方法'
: T[P];
};
// export type IStore<T> = {
// [P in keyof T]: T[P] extends Function
// ? T[P]
// : IModel<T[P]>;
// };
export type IStore<T> = {
[P in keyof T]: T[P];
};