types: 类型优化

This commit is contained in:
kailong321200875
2023-07-09 11:19:44 +08:00
parent 0a273ff8c8
commit 283bc58d46
4 changed files with 70 additions and 247 deletions

4
types/global.d.ts vendored
View File

@@ -10,6 +10,10 @@ declare global {
declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
declare type RemoveReadonly<T> = {
-readonly [P in keyof T]: T[P]
}
declare type ComponentRef<T> = InstanceType<T>
declare type LocaleType = 'zh-CN' | 'en'