@opentiny/utils 3.22.0 → 3.23.0

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.
@@ -65,3 +65,10 @@ export declare const VALIDATE_STATE: Record<string, string>;
65
65
  * @type {Record<string, any>}
66
66
  */
67
67
  export declare const CASCADER: Record<string, any>;
68
+ /**
69
+ * 检查对象是否具有任何一个指定的键
70
+ * @param obj 需要检查的对象
71
+ * @param keys 需要检查的键的数组
72
+ * @return 如果对象具有任何一个指定的键,返回true,否则返回false
73
+ */
74
+ export declare const hasAnyKey: (obj: any, keys: string[]) => boolean;
@@ -12,10 +12,10 @@
12
12
  declare const api: {
13
13
  targetElement: null;
14
14
  opts: null;
15
- isEnabled: any;
15
+ isEnabled: boolean | undefined;
16
16
  isFullscreen: boolean;
17
- toggle(target: any, options: any, force: any): Promise<unknown>;
18
- request(targetEle: any, options: any): Promise<unknown>;
19
- exit(): Promise<unknown>;
17
+ toggle(target: any, options: any, force: any): Promise<void>;
18
+ request(targetEle: any, options: any): Promise<void>;
19
+ exit(): Promise<void>;
20
20
  };
21
21
  export default api;
@@ -9,14 +9,27 @@
9
9
  * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
10
  *
11
11
  */
12
- declare const screenfull: {
13
- request(element: any, options: any): Promise<unknown>;
14
- exit(): Promise<unknown>;
15
- toggle(element: any, options: any): any;
16
- onchange(callback: any): void;
17
- onerror(callback: any): void;
18
- on(event: any, callback: any): void;
19
- off(event: any, callback: any): void;
20
- raw: {};
21
- };
12
+ interface FullscreenEvents {
13
+ fullscreenElement: string;
14
+ fullscreenEnabled: string;
15
+ requestFullscreen: string;
16
+ exitFullscreen: string;
17
+ fullscreenchange: string;
18
+ fullscreenerror: string;
19
+ [key: string]: string;
20
+ }
21
+ interface Screenfull {
22
+ request: (element?: any, options?: any) => Promise<void>;
23
+ exit: () => Promise<void>;
24
+ toggle: (element?: any, options?: any) => Promise<void>;
25
+ onchange: (callback: any) => void;
26
+ onerror: (callback: any) => void;
27
+ on: (event: string, callback: any) => void;
28
+ off: (event: string, callback: any) => void;
29
+ raw: FullscreenEvents | {};
30
+ isFullscreen?: boolean;
31
+ element?: any;
32
+ isEnabled?: boolean;
33
+ }
34
+ declare const screenfull: Screenfull;
22
35
  export default screenfull;