dydx-naive-ui-for-vue 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dydx-naive-ui-for-vue.js +379 -371
- package/dist/dydx-naive-ui-for-vue.umd.cjs +1 -1
- package/dist/types/components/NaiveForm/src/DydxNaiveForm.vue.d.ts +1 -1
- package/dist/types/components/NaiveForm/types/schema.d.ts +1 -3
- package/dist/types/components/NaiveTable/types/columns.d.ts +8 -3
- package/dist/types/index.d.ts +2606 -3
- package/dist/types/types/utils.d.ts +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 深度路径类型 - 提取对象的所有嵌套键路径
|
|
3
|
+
* @example
|
|
4
|
+
* type User = { name: string; profile: { age: number; address: { city: string } } }
|
|
5
|
+
* type UserKeys = DeepKeys<User> // 'name' | 'profile' | 'profile.age' | 'profile.address' | 'profile.address.city'
|
|
6
|
+
*/
|
|
7
|
+
export type DeepKeys<T> = T extends object ? {
|
|
8
|
+
[K in keyof T]-?: K extends string | number ? T[K] extends object ? `${K}` | `${K}.${DeepKeys<T[K]>}` : `${K}` : never;
|
|
9
|
+
}[keyof T] : never;
|
|
10
|
+
/**
|
|
11
|
+
* 字符串键类型 - 确保键为字符串类型
|
|
12
|
+
*/
|
|
13
|
+
export type StringKeys<T> = Extract<keyof T, string>;
|