mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-04 07:27:41 +08:00
types: 添加 Exclusive
类型互斥语法糖
This commit is contained in:
parent
1aba27590f
commit
5f3210f69e
4
types/index.d.ts
vendored
4
types/index.d.ts
vendored
@ -41,6 +41,10 @@ type DeepPartial<T> = {
|
||||
[P in keyof T]?: DeepPartial<T[P]>;
|
||||
};
|
||||
|
||||
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
|
||||
|
||||
type Exclusive<T, U> = (Without<T, U> & U) | (Without<U, T> & T);
|
||||
|
||||
type TimeoutHandle = ReturnType<typeof setTimeout>;
|
||||
|
||||
type IntervalHandle = ReturnType<typeof setInterval>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user