mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
types: optimize data types (#254)
This commit is contained in:
7
src/types/global.d.ts
vendored
7
src/types/global.d.ts
vendored
@@ -49,7 +49,9 @@ declare global {
|
||||
|
||||
declare type Nullable<T> = T | null;
|
||||
declare type NonNullable<T> = T extends null | undefined ? never : T;
|
||||
// String type object
|
||||
declare type Recordable<T = any> = Record<string, T>;
|
||||
// Object of read-only string type
|
||||
declare type ReadonlyRecordable<T = any> = {
|
||||
readonly [key: string]: T;
|
||||
};
|
||||
@@ -108,6 +110,11 @@ declare global {
|
||||
}
|
||||
}
|
||||
}
|
||||
type AnyNormalFunction = (...arg: any) => any;
|
||||
|
||||
type AnyPromiseFunction = (...arg: any) => PromiseLike<any>;
|
||||
|
||||
declare type AnyFunction = AnyNormalFunction | AnyPromiseFunction;
|
||||
|
||||
declare module "vue" {
|
||||
export type JSXComponent<Props = any> = { new (): ComponentPublicInstance<Props> } | FunctionalComponent<Props>;
|
||||
|
Reference in New Issue
Block a user