1/*
2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkTS
19 */
20
21/**
22 * TextDecoder support full encoding in ICU data utf-8 utf-16 iso8859 must support in all device, TextEncoder takes a
23 * stream of code points as input and emits a stream of UTF-8 bytes, and system help function.
24 *
25 * @namespace util
26 * @syscap SystemCapability.Utils.Lang
27 * @since 7
28 */
29/**
30 * TextDecoder support full encoding in ICU data utf-8 utf-16 iso8859 must support in all device, TextEncoder takes a
31 * stream of code points as input and emits a stream of UTF-8 bytes, and system help function.
32 *
33 * @namespace util
34 * @syscap SystemCapability.Utils.Lang
35 * @crossplatform
36 * @since 10
37 */
38/**
39 * TextDecoder support full encoding in ICU data utf-8 utf-16 iso8859 must support in all device, TextEncoder takes a
40 * stream of code points as input and emits a stream of UTF-8 bytes, and system help function.
41 *
42 * @namespace util
43 * @syscap SystemCapability.Utils.Lang
44 * @crossplatform
45 * @atomicservice
46 * @since 11
47 */
48declare namespace util {
49  /**
50   * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented
51   * with an n and Objects that have no user defined toString function are inspected using util.inspect() with
52   * options { depth: 0, colors: false, compact: 3 }.
53   * %d: Number will be used to convert all values except BigInt and Symbol.
54   * %i: parseInt(value, 10) is used for all values except BigInt and Symbol.
55   * %f: parseFloat(value) is used for all values except Bigint and Symbol.
56   * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references.
57   * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to
58   * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including
59   * non-enumerable properties and proxies.
60   * %O: Object. A string representation of an object with generic JavaScript object formatting.
61   * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to
62   * util.inspect() without options. This will show the full object not including non-enumerable properties and
63   * proxies.
64   * %c: CSS. This specifier is ignored and will skip any CSS passed in.
65   * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string.
66   *
67   * @param { string } format - Styled string
68   * @param { Object[] } args - Data to be formatted
69   * @returns { string } Return the character string formatted in a specific format
70   * @syscap SystemCapability.Utils.Lang
71   * @since 7
72   * @deprecated since 9
73   * @useinstead ohos.util.format
74   */
75  function printf(format: string, ...args: Object[]): string;
76
77  /**
78   * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented
79   * with an n and Objects that have no user defined toString function are inspected using util.inspect() with
80   * options { depth: 0, colors: false, compact: 3 }.
81   * %d: Number will be used to convert all values except BigInt and Symbol.
82   * %i: parseInt(value, 10) is used for all values except BigInt and Symbol.
83   * %f: parseFloat(value) is used for all values except Bigint and Symbol.
84   * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references.
85   * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to
86   * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including
87   * non-enumerable properties and proxies.
88   * %O: Object. A string representation of an object with generic JavaScript object formatting.
89   * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to
90   * util.inspect() without options. This will show the full object not including non-enumerable properties and
91   * proxies.
92   * %c: CSS. This specifier is ignored and will skip any CSS passed in.
93   * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string.
94   *
95   * @param { string } format - Styled string
96   * @param { Object[] } args - Data to be formatted
97   * @returns { string } Return the character string formatted in a specific format
98   * @throws { BusinessError } 401 - Parameter error. Possible causes:
99   * 1.Mandatory parameters are left unspecified;
100   * 2.Incorrect parameter types.
101   * @syscap SystemCapability.Utils.Lang
102   * @since 9
103   */
104  /**
105   * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented
106   * with an n and Objects that have no user defined toString function are inspected using util.inspect() with
107   * options { depth: 0, colors: false, compact: 3 }.
108   * %d: Number will be used to convert all values except BigInt and Symbol.
109   * %i: parseInt(value, 10) is used for all values except BigInt and Symbol.
110   * %f: parseFloat(value) is used for all values except Bigint and Symbol.
111   * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references.
112   * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to
113   * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including
114   * non-enumerable properties and proxies.
115   * %O: Object. A string representation of an object with generic JavaScript object formatting.
116   * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to
117   * util.inspect() without options. This will show the full object not including non-enumerable properties and
118   * proxies.
119   * %c: CSS. This specifier is ignored and will skip any CSS passed in.
120   * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string.
121   *
122   * @param { string } format - Styled string
123   * @param { Object[] } args - Data to be formatted
124   * @returns { string } a string formatted in a specific format.
125   * @throws { BusinessError } 401 - Parameter error. Possible causes:
126   * 1.Mandatory parameters are left unspecified;
127   * 2.Incorrect parameter types.
128   * @syscap SystemCapability.Utils.Lang
129   * @crossplatform
130   * @since 10
131   */
132  /**
133   * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented
134   * with an n and Objects that have no user defined toString function are inspected using util.inspect() with
135   * options { depth: 0, colors: false, compact: 3 }.
136   * %d: Number will be used to convert all values except BigInt and Symbol.
137   * %i: parseInt(value, 10) is used for all values except BigInt and Symbol.
138   * %f: parseFloat(value) is used for all values except Bigint and Symbol.
139   * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references.
140   * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to
141   * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including
142   * non-enumerable properties and proxies.
143   * %O: Object. A string representation of an object with generic JavaScript object formatting.
144   * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to
145   * util.inspect() without options. This will show the full object not including non-enumerable properties and
146   * proxies.
147   * %c: CSS. This specifier is ignored and will skip any CSS passed in.
148   * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string.
149   *
150   * @param { string } format - Styled string
151   * @param { Object[] } args - Data to be formatted
152   * @returns { string } a string formatted in a specific format.
153   * @throws { BusinessError } 401 - Parameter error. Possible causes:
154   * 1.Mandatory parameters are left unspecified;
155   * 2.Incorrect parameter types.
156   * @syscap SystemCapability.Utils.Lang
157   * @crossplatform
158   * @atomicservice
159   * @since 12
160   */
161  function format(format: string, ...args: Object[]): string;
162
163  /**
164   * Get the string name of the system errno.
165   *
166   * @param { number } errno - The error code generated by an error in the system
167   * @returns { string } Return the string name of a system errno
168   * @syscap SystemCapability.Utils.Lang
169   * @since 7
170   * @deprecated since 9
171   * @useinstead ohos.util.errnoToString
172   */
173  function getErrorString(errno: number): string;
174
175  /**
176   * Get the string name of the system errno.
177   *
178   * @param { number } errno - The error code generated by an error in the system
179   * @returns { string } Return the string name of a system errno
180   * @throws { BusinessError } 401 - Parameter error. Possible causes:
181   * 1.Mandatory parameters are left unspecified;
182   * 2.Incorrect parameter types.
183   * @syscap SystemCapability.Utils.Lang
184   * @since 9
185   */
186  /**
187   * Get the string name of the system errno.
188   *
189   * @param { number } errno - The error code generated by an error in the system
190   * @returns { string } Return the string name of a system errno
191   * @throws { BusinessError } 401 - Parameter error. Possible causes:
192   * 1.Mandatory parameters are left unspecified;
193   * 2.Incorrect parameter types.
194   * @syscap SystemCapability.Utils.Lang
195   * @crossplatform
196   * @since 10
197   */
198  /**
199   * Get the string name of the system errno.
200   *
201   * @param { number } errno - The error code generated by an error in the system
202   * @returns { string } Return the string name of a system errno
203   * @throws { BusinessError } 401 - Parameter error. Possible causes:
204   * 1.Mandatory parameters are left unspecified;
205   * 2.Incorrect parameter types.
206   * @syscap SystemCapability.Utils.Lang
207   * @crossplatform
208   * @atomicservice
209   * @since 12
210   */
211  function errnoToString(errno: number): string;
212
213  /**
214   * Takes an async function (or a function that returns a Promise) and returns a function following the
215   * error-first callback style.
216   *
217   * @param { Function } original - Asynchronous function
218   * @returns { function } Return a Asynchronous function
219   * @throws { BusinessError } 401 - Parameter error. Possible causes:
220   * 1.Mandatory parameters are left unspecified;
221   * 2.Incorrect parameter types.
222   * @syscap SystemCapability.Utils.Lang
223   * @since 7
224   */
225  /**
226   * Takes an async function (or a function that returns a Promise) and returns a function following the
227   * error-first callback style.
228   *
229   * @param { Function } original - Asynchronous function
230   * @returns { function } Return a Asynchronous function
231   * @throws { BusinessError } 401 - Parameter error. Possible causes:
232   * 1.Mandatory parameters are left unspecified;
233   * 2.Incorrect parameter types.
234   * @syscap SystemCapability.Utils.Lang
235   * @crossplatform
236   * @since 10
237   */
238  /**
239   * Takes an async function (or a function that returns a Promise) and returns a function following the
240   * error-first callback style.
241   *
242   * @param { Function } original - Asynchronous function
243   * @returns { function } Return a Asynchronous function
244   * @throws { BusinessError } 401 - Parameter error. Possible causes:
245   * 1.Mandatory parameters are left unspecified;
246   * 2.Incorrect parameter types.
247   * @syscap SystemCapability.Utils.Lang
248   * @crossplatform
249   * @atomicservice
250   * @since 12
251   */
252  function callbackWrapper(original: Function): (err: Object, value: Object) => void;
253
254  /**
255   * Takes a function following the common error-first callback style, i.e taking an (err, value) =>
256   * callback as the last argument, and return a function that returns promises.
257   *
258   * @param { function } original - Asynchronous function
259   * @returns { function } Return a function that returns promises
260   * @throws { BusinessError } 401 - Parameter error. Possible causes:
261   * 1.Mandatory parameters are left unspecified;
262   * 2.Incorrect parameter types.
263   * @syscap SystemCapability.Utils.Lang
264   * @since 9
265   */
266  /**
267   * Takes a function following the common error-first callback style, i.e taking an (err, value) =>
268   * callback as the last argument, and return a function that returns promises.
269   *
270   * @param { function } original - Asynchronous function
271   * @returns { Function } Return a function that returns promises
272   * @throws { BusinessError } 401 - Parameter error. Possible causes:
273   * 1.Mandatory parameters are left unspecified;
274   * 2.Incorrect parameter types.
275   * @syscap SystemCapability.Utils.Lang
276   * @crossplatform
277   * @since 10
278   */
279  /**
280   * Takes a function following the common error-first callback style, i.e taking an (err, value) =>
281   * callback as the last argument, and return a function that returns promises.
282   *
283   * @param { function } original - Asynchronous function
284   * @returns { Function } Return a function that returns promises
285   * @throws { BusinessError } 401 - Parameter error. Possible causes:
286   * 1.Mandatory parameters are left unspecified;
287   * 2.Incorrect parameter types.
288   * @syscap SystemCapability.Utils.Lang
289   * @crossplatform
290   * @atomicservice
291   * @since 12
292   */
293  function promisify(original: (err: Object, value: Object) => void): Function;
294
295  /**
296   * Takes a function following the common error-first callback style, i.e taking an (err, value) =>
297   * callback as the last argument, and return a version that returns promises.
298   *
299   * @param { function } original - Asynchronous function
300   * @returns { Object } Return a version that returns promises
301   * @syscap SystemCapability.Utils.Lang
302   * @since 7
303   * @deprecated since 9
304   * @useinstead ohos.util.promisify
305   */
306  function promiseWrapper(original: (err: Object, value: Object) => void): Object;
307
308  /**
309   * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator.
310   *
311   * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true.
312   * @returns { string } Return a string representing this UUID.
313   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
314   * @syscap SystemCapability.Utils.Lang
315   * @since 9
316   */
317  /**
318   * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator.
319   *
320   * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true.
321   * @returns { string } Return a string representing this UUID.
322   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
323   * @syscap SystemCapability.Utils.Lang
324   * @crossplatform
325   * @since 10
326   */
327  /**
328   * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator.
329   *
330   * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true.
331   * @returns { string } Return a string representing this UUID.
332   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
333   * @syscap SystemCapability.Utils.Lang
334   * @crossplatform
335   * @atomicservice
336   * @since 12
337   */
338  function generateRandomUUID(entropyCache?: boolean): string;
339
340  /**
341   * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator.
342   *
343   * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true.
344   * @returns { Uint8Array } Return a Uint8Array representing this UUID.
345   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
346   * @syscap SystemCapability.Utils.Lang
347   * @since 9
348   */
349  /**
350   * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator.
351   *
352   * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true.
353   * @returns { Uint8Array } Return a Uint8Array representing this UUID.
354   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
355   * @syscap SystemCapability.Utils.Lang
356   * @crossplatform
357   * @since 10
358   */
359  /**
360   * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator.
361   *
362   * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true.
363   * @returns { Uint8Array } Return a Uint8Array representing this UUID.
364   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
365   * @syscap SystemCapability.Utils.Lang
366   * @crossplatform
367   * @atomicservice
368   * @since 12
369   */
370  function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array;
371
372  /**
373   * Parse a UUID from the string standard representation as described in the RFC 4122 version 4.
374   *
375   * @param { string } uuid - String that specifies a UUID
376   * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails.
377   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
378   * @syscap SystemCapability.Utils.Lang
379   * @since 9
380   */
381  /**
382   * Parse a UUID from the string standard representation as described in the RFC 4122 version 4.
383   *
384   * @param { string } uuid - String that specifies a UUID
385   * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails.
386   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
387   * @syscap SystemCapability.Utils.Lang
388   * @crossplatform
389   * @since 10
390   */
391  /**
392   * Parse a UUID from the string standard representation as described in the RFC 4122 version 4.
393   *
394   * @param { string } uuid - String that specifies a UUID
395   * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails.
396   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
397   * @throws { BusinessError } 10200002 - Invalid uuid string.
398   * @syscap SystemCapability.Utils.Lang
399   * @crossplatform
400   * @atomicservice
401   * @since 12
402   */
403  function parseUUID(uuid: string): Uint8Array;
404
405  /**
406   * Get the hash code of an object.
407   *
408   * @param { object } [object] - The object that need to get hash code.
409   * @returns { number } Return a hash code of an object.
410   * @throws { BusinessError } 401 - Parameter error. Possible causes:
411   * 1.Mandatory parameters are left unspecified;
412   * 2.Incorrect parameter types.
413   * @syscap SystemCapability.Utils.Lang
414   * @crossplatform
415   * @atomicservice
416   * @since 12
417   */
418  function getHash(object: object): number;
419
420  /**
421   * Defines the TextDecoder related options parameters.
422   *
423   * @interface TextDecoderOptions
424   * @syscap SystemCapability.Utils.Lang
425   * @crossplatform
426   * @atomicservice
427   * @since 11
428   */
429  interface TextDecoderOptions {
430    /**
431     * Is a fatal error displayed? The default value is false.
432     * @type { ?boolean }
433     * @syscap SystemCapability.Utils.Lang
434     * @crossplatform
435     * @atomicservice
436     * @since 11
437     */
438    fatal?: boolean;
439    /**
440    * Do you want to ignore BOM tags? The default value is false.
441    * @type { ?boolean }
442    * @syscap SystemCapability.Utils.Lang
443    * @crossplatform
444    * @atomicservice
445    * @since 11
446    */
447    ignoreBOM?: boolean;
448  }
449
450  /**
451   * Defines the decode with stream related options parameters.
452   *
453   * @interface DecodeWithStreamOptions
454   * @syscap SystemCapability.Utils.Lang
455   * @crossplatform
456   * @atomicservice
457   * @since 11
458   */
459  interface DecodeWithStreamOptions {
460    /**
461    * Does the call follow additional data blocks. The default value is false.
462    * @type { ?boolean }
463    * @syscap SystemCapability.Utils.Lang
464    * @crossplatform
465    * @atomicservice
466    * @since 11
467    */
468    stream?: boolean;
469  }
470
471  /**
472   * Defines the decode with stream related options parameters.
473   *
474   * @interface DecodeToStringOptions
475   * @syscap SystemCapability.Utils.Lang
476   * @crossplatform
477   * @atomicservice
478   * @since 12
479   */
480  interface DecodeToStringOptions {
481    /**
482    * Stream option controls stream processing in decoding. The default value is false.
483    * @type { ?boolean }
484    * @syscap SystemCapability.Utils.Lang
485    * @crossplatform
486    * @atomicservice
487    * @since 12
488    */
489    stream?: boolean;
490  }
491
492  /**
493   * The TextDecoder represents a text decoder that accepts a string as input,
494   * decodes it in UTF-8 format, and outputs UTF-8 byte stream.
495   *
496   * @syscap SystemCapability.Utils.Lang
497   * @since 7
498   */
499  /**
500   * The TextDecoder represents a text decoder that accepts a string as input,
501   * decodes it in UTF-8 format, and outputs UTF-8 byte stream.
502   *
503   * @syscap SystemCapability.Utils.Lang
504   * @crossplatform
505   * @since 10
506   */
507  /**
508   * The TextDecoder represents a text decoder that accepts a string as input,
509   * decodes it in UTF-8 format, and outputs UTF-8 byte stream.
510   *
511   * @syscap SystemCapability.Utils.Lang
512   * @crossplatform
513   * @atomicservice
514   * @since 11
515   */
516  class TextDecoder {
517    /**
518     * The textDecoder constructor.
519     *
520     * @syscap SystemCapability.Utils.Lang
521     * @since 9
522     */
523    /**
524     * The textDecoder constructor.
525     *
526     * @syscap SystemCapability.Utils.Lang
527     * @crossplatform
528     * @since 10
529     */
530    /**
531     * The textDecoder constructor.
532     *
533     * @syscap SystemCapability.Utils.Lang
534     * @crossplatform
535     * @atomicservice
536     * @since 12
537     */
538    constructor();
539
540    /**
541     * The source encoding's name, lowercased.
542     *
543     * @type { string }
544     * @syscap SystemCapability.Utils.Lang
545     * @since 7
546     */
547    /**
548     * The source encoding's name, lowercased.
549     *
550     * @type { string }
551     * @syscap SystemCapability.Utils.Lang
552     * @crossplatform
553     * @since 10
554     */
555    /**
556     * The source encoding's name, lowercased.
557     *
558     * @type { string }
559     * @syscap SystemCapability.Utils.Lang
560     * @crossplatform
561     * @atomicservice
562     * @since 12
563     */
564    readonly encoding: string;
565
566    /**
567     * Returns `true` if error mode is "fatal", and `false` otherwise.
568     *
569     * @type { boolean }
570     * @syscap SystemCapability.Utils.Lang
571     * @since 7
572     */
573    /**
574     * Returns `true` if error mode is "fatal", and `false` otherwise.
575     *
576     * @type { boolean }
577     * @syscap SystemCapability.Utils.Lang
578     * @crossplatform
579     * @since 10
580     */
581    /**
582     * Returns `true` if error mode is "fatal", and `false` otherwise.
583     *
584     * @type { boolean }
585     * @syscap SystemCapability.Utils.Lang
586     * @crossplatform
587     * @atomicservice
588     * @since 12
589     */
590    readonly fatal: boolean;
591
592    /**
593     * Returns `true` if ignore BOM flag is set, and `false` otherwise.
594     *
595     * @type { false }
596     * @syscap SystemCapability.Utils.Lang
597     * @since 7
598     */
599    /**
600     * Returns `true` if ignore BOM flag is set, and `false` otherwise.
601     *
602     * @type { false }
603     * @syscap SystemCapability.Utils.Lang
604     * @crossplatform
605     * @since 10
606     */
607    /**
608     * Returns `true` if ignore BOM flag is set, and `false` otherwise.
609     *
610     * @type { false }
611     * @syscap SystemCapability.Utils.Lang
612     * @crossplatform
613     * @atomicservice
614     * @since 12
615     */
616    readonly ignoreBOM = false;
617
618    /**
619     * The textDecoder constructor.
620     *
621     * @param { string } encoding - Decoding format
622     * @param { object } options - Options
623     * @syscap SystemCapability.Utils.Lang
624     * @since 7
625     * @deprecated since 9
626     * @useinstead ohos.util.TextDecoder.create
627     */
628    constructor(encoding?: string, options?: { fatal?: boolean; ignoreBOM?: boolean });
629
630    /**
631     * Replaces the original constructor to process arguments and return a textDecoder object.
632     *
633     * @param { string } encoding - Decoding format
634     * @param { object } options - Options
635     * @returns { TextDecoder }
636     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
637     * @syscap SystemCapability.Utils.Lang
638     * @since 9
639     */
640    /**
641     * Replaces the original constructor to process arguments and return a textDecoder object.
642     *
643     * @param { string } encoding - Decoding format
644     * @param { object } options - Options
645     * @returns { TextDecoder }
646     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
647     * @syscap SystemCapability.Utils.Lang
648     * @crossplatform
649     * @since 10
650     */
651    /**
652     * Replaces the original constructor to process arguments and return a textDecoder object.
653     *
654     * @param { string } [encoding] - Decoding format
655     * @param { TextDecoderOptions } [options] - Options
656     * @returns { TextDecoder }
657     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
658     * @syscap SystemCapability.Utils.Lang
659     * @crossplatform
660     * @atomicservice
661     * @since 11
662     */
663    static create(encoding?: string, options?: TextDecoderOptions): TextDecoder;
664
665    /**
666     * Returns the result of running encoding's decoder.
667     *
668     * @param { Uint8Array } input - Decoded numbers in accordance with the format
669     * @param { object } options - Options
670     * @returns { string } Return decoded text
671     * @syscap SystemCapability.Utils.Lang
672     * @since 7
673     * @deprecated since 9
674     * @useinstead ohos.util.decodeWithStream
675     */
676    decode(input: Uint8Array, options?: { stream?: false }): string;
677
678    /**
679     * Decodes the input and returns a string. If options.stream is true, any incomplete byte sequences occurring
680     * at the end of the input are buffered internally and emitted after the next call to textDecoder.decode().
681     * If textDecoder.fatal is true, decoding errors that occur will result in a TypeError being thrown.
682     *
683     * @param { Uint8Array } input - Decoded numbers in accordance with the format
684     * @param { object } options - Options
685     * @returns { string } Return decoded text
686     * @throws { BusinessError } 401 - Parameter error. Possible causes:
687     * 1.Mandatory parameters are left unspecified;
688     * 2.Incorrect parameter types.
689     * @syscap SystemCapability.Utils.Lang
690     * @since 9
691     */
692    /**
693     * Decodes the input and returns a string. If options.stream is true, any incomplete byte sequences occurring
694     * at the end of the input are buffered internally and emitted after the next call to textDecoder.decode().
695     * If textDecoder.fatal is true, decoding errors that occur will result in a TypeError being thrown.
696     *
697     * @param { Uint8Array } input - Decoded numbers in accordance with the format
698     * @param { object } options - Options
699     * @returns { string } Return decoded text
700     * @throws { BusinessError } 401 - Parameter error. Possible causes:
701     * 1.Mandatory parameters are left unspecified;
702     * 2.Incorrect parameter types.
703     * @syscap SystemCapability.Utils.Lang
704     * @crossplatform
705     * @since 10
706     */
707    /**
708     * Decodes the input and returns a string. If options.stream is true, any incomplete byte sequences occurring
709     * at the end of the input are buffered internally and emitted after the next call to textDecoder.decode().
710     * If textDecoder.fatal is true, decoding errors that occur will result in a TypeError being thrown.
711     *
712     * @param { Uint8Array } input - Decoded numbers in accordance with the format
713     * @param { DecodeWithStreamOptions } [options] - Options
714     * @returns { string } Return decoded text
715     * @throws { BusinessError } 401 - Parameter error. Possible causes:
716     * 1.Mandatory parameters are left unspecified;
717     * 2.Incorrect parameter types.
718     * @syscap SystemCapability.Utils.Lang
719     * @crossplatform
720     * @atomicservice
721     * @since 11
722     * @deprecated since 12
723     * @useinstead ohos.util.decodeToString
724     */
725    decodeWithStream(input: Uint8Array, options?: DecodeWithStreamOptions): string;
726    /**
727     * The input is decoded and a string is returned.
728     * If options.stream is set to true, any incomplete byte sequences found at the end of the input are internally
729     * buffered and will be emitted after the next call to textDecoder.decodeToString().
730     * If textDecoder.fatal is set to true, any decoding errors that occur will result in a TypeError being thrown.
731     *
732     * @param { Uint8Array } input - Decoded numbers in accordance with the format.
733     * @param { DecodeToStringOptions } [options] - The default option is set to false.
734     * @returns { string } Return decoded text
735     * @throws { BusinessError } 401 - Parameter error. Possible causes:
736     * 1.Mandatory parameters are left unspecified;
737     * 2.Incorrect parameter types.
738     * @syscap SystemCapability.Utils.Lang
739     * @crossplatform
740     * @atomicservice
741     * @since 12
742     */
743    decodeToString(input: Uint8Array, options?: DecodeToStringOptions): string;
744  }
745
746  /**
747   * Return encoded text.
748   *
749   * @interface EncodeIntoUint8ArrayInfo
750   * @syscap SystemCapability.Utils.Lang
751   * @crossplatform
752   * @atomicservice
753   * @since 11
754   */
755  interface EncodeIntoUint8ArrayInfo {
756    /**
757    * The read represents the number of characters that have been encoded.
758    * @type { number }
759    * @syscap SystemCapability.Utils.Lang
760    * @crossplatform
761    * @atomicservice
762    * @since 11
763    */
764    read: number;
765    /**
766    * The written represents the number of bytes occupied by the encoded characters.
767    * @type { number }
768    * @syscap SystemCapability.Utils.Lang
769    * @crossplatform
770    * @atomicservice
771    * @since 11
772    */
773    written: number;
774  }
775
776  /**
777   * The TextEncoder interface represents a text encoder.
778   * The encoder takes the byte stream as the input and outputs the String string.
779   *
780   * @syscap SystemCapability.Utils.Lang
781   * @since 7
782   */
783  /**
784   * The TextEncoder interface represents a text encoder.
785   * The encoder takes the byte stream as the input and outputs the String string.
786   *
787   * @syscap SystemCapability.Utils.Lang
788   * @crossplatform
789   * @since 10
790   */
791  /**
792   * The TextEncoder interface represents a text encoder.
793   * The encoder takes the byte stream as the input and outputs the String string.
794   *
795   * @syscap SystemCapability.Utils.Lang
796   * @crossplatform
797   * @atomicservice
798   * @since 11
799   */
800  class TextEncoder {
801    /**
802     * Encoding format.
803     *
804     * @type { 'utf-8' }
805     * @syscap SystemCapability.Utils.Lang
806     * @since 7
807     */
808    /**
809     * Encoding format.
810     *
811     * @type { 'utf-8' }
812     * @syscap SystemCapability.Utils.Lang
813     * @crossplatform
814     * @since 10
815     */
816    /**
817     * Encoding format.
818     *
819     * @type { 'utf-8' }
820     * @syscap SystemCapability.Utils.Lang
821     * @crossplatform
822     * @atomicservice
823     * @since 12
824     */
825    readonly encoding = 'utf-8';
826
827    /**
828     * The textEncoder constructor.
829     *
830     * @syscap SystemCapability.Utils.Lang
831     * @since 7
832     */
833    /**
834     * The textEncoder constructor.
835     *
836     * @syscap SystemCapability.Utils.Lang
837     * @crossplatform
838     * @since 10
839     */
840    /**
841     * The textEncoder constructor.
842     *
843     * @syscap SystemCapability.Utils.Lang
844     * @crossplatform
845     * @atomicservice
846     * @since 11
847     */
848    constructor();
849
850    /**
851     * The textEncoder constructor.
852     *
853     * @param { string } [encoding] - The string for encoding format.
854     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
855     * @syscap SystemCapability.Utils.Lang
856     * @since 9
857     */
858    /**
859     * The textEncoder constructor.
860     *
861     * @param { string } [encoding] - The string for encoding format.
862     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
863     * @syscap SystemCapability.Utils.Lang
864     * @crossplatform
865     * @since 10
866     */
867    /**
868     * The textEncoder constructor.
869     *
870     * @param { string } [encoding] - The string for encoding format.
871     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
872     * @syscap SystemCapability.Utils.Lang
873     * @crossplatform
874     * @atomicservice
875     * @since 11
876     */
877    constructor(encoding?: string);
878
879    /**
880     * Create a TextEncoder object.
881     *
882     * @param { string } [encoding] - The string for encoding format.
883     * @returns { TextEncoder }
884     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
885     * @syscap SystemCapability.Utils.Lang
886     * @crossplatform
887     * @atomicservice
888     * @since 12
889     */
890    static create(encoding?: string): TextEncoder;
891
892    /**
893     * Returns the result of encoder.
894     *
895     * @param { string } [input] - The string to be encoded.
896     * @returns { Uint8Array } Returns the encoded text.
897     * @syscap SystemCapability.Utils.Lang
898     * @since 7
899     * @deprecated since 9
900     * @useinstead ohos.util.encodeInto
901     */
902    encode(input?: string): Uint8Array;
903
904    /**
905     * UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes.
906     *
907     * @param { string } [input] - The string to be encoded.
908     * @returns { Uint8Array } Returns the encoded text.
909     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
910     * @syscap SystemCapability.Utils.Lang
911     * @since 9
912     */
913    /**
914     * UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes.
915     *
916     * @param { string } [input] - The string to be encoded.
917     * @returns { Uint8Array } Returns the encoded text.
918     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
919     * @syscap SystemCapability.Utils.Lang
920     * @crossplatform
921     * @since 10
922     */
923    /**
924     * UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes.
925     *
926     * @param { string } [input] - The string to be encoded.
927     * @returns { Uint8Array } Returns the encoded text.
928     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
929     * @syscap SystemCapability.Utils.Lang
930     * @crossplatform
931     * @atomicservice
932     * @since 11
933     */
934    encodeInto(input?: string): Uint8Array;
935
936    /**
937     * Encode string, write the result to dest array.
938     *
939     * @param { string } input - The string to be encoded.
940     * @param { Uint8Array } dest - Encoded numbers in accordance with the format
941     * @returns { object } Return the object, where read represents
942     * the number of characters that have been encoded, and written
943     * represents the number of bytes occupied by the encoded characters.
944     * @syscap SystemCapability.Utils.Lang
945     * @since 7
946     * @deprecated since 9
947     * @useinstead ohos.util.encodeIntoUint8Array
948     */
949    encodeInto(input: string, dest: Uint8Array): { read: number; written: number };
950
951    /**
952     * Encode string, write the result to dest array.
953     *
954     * @param { string } input - The string to be encoded.
955     * @param { Uint8Array } dest - Encoded numbers in accordance with the format
956     * @returns { object } Return the object, where read represents
957     * the number of characters that have been encoded, and written
958     * represents the number of bytes occupied by the encoded characters.
959     * @throws { BusinessError } 401 - Parameter error. Possible causes:
960     * 1.Mandatory parameters are left unspecified;
961     * 2.Incorrect parameter types.
962     * @syscap SystemCapability.Utils.Lang
963     * @since 9
964     */
965    /**
966     * Encode string, write the result to dest array.
967     *
968     * @param { string } input - The string to be encoded.
969     * @param { Uint8Array } dest - Encoded numbers in accordance with the format
970     * @returns { object } Return the object, where read represents
971     * the number of characters that have been encoded, and written
972     * represents the number of bytes occupied by the encoded characters.
973     * @throws { BusinessError } 401 - Parameter error. Possible causes:
974     * 1.Mandatory parameters are left unspecified;
975     * 2.Incorrect parameter types.
976     * @syscap SystemCapability.Utils.Lang
977     * @crossplatform
978     * @since 10
979     */
980    /**
981     * Encode string, write the result to dest array.
982     *
983     * @param { string } input - The string to be encoded.
984     * @param { Uint8Array } dest - Encoded numbers in accordance with the format
985     * @returns { EncodeIntoUint8ArrayInfo } Return the object, where read represents
986     * the number of characters that have been encoded, and written
987     * represents the number of bytes occupied by the encoded characters.
988     * @throws { BusinessError } 401 - Parameter error. Possible causes:
989     * 1.Mandatory parameters are left unspecified;
990     * 2.Incorrect parameter types.
991     * @syscap SystemCapability.Utils.Lang
992     * @crossplatform
993     * @atomicservice
994     * @since 11
995     */
996    encodeIntoUint8Array(input: string, dest: Uint8Array): EncodeIntoUint8ArrayInfo;
997  }
998
999  /**
1000   * The rational number is mainly to compare rational numbers and obtain the numerator and denominator.
1001   *
1002   * @syscap SystemCapability.Utils.Lang
1003   * @since 8
1004   */
1005  /**
1006   * The rational number is mainly to compare rational numbers and obtain the numerator and denominator.
1007   *
1008   * @syscap SystemCapability.Utils.Lang
1009   * @crossplatform
1010   * @since 10
1011   */
1012  /**
1013   * The rational number is mainly to compare rational numbers and obtain the numerator and denominator.
1014   *
1015   * @syscap SystemCapability.Utils.Lang
1016   * @crossplatform
1017   * @atomicservice
1018   * @since 12
1019   */
1020  class RationalNumber {
1021    /**
1022     * A constructor used to create a RationalNumber instance with a given numerator and denominator.
1023     *
1024     * @param { number } numerator - An integer number
1025     * @param { number } denominator - An integer number
1026     * @syscap SystemCapability.Utils.Lang
1027     * @since 8
1028     * @deprecated since 9
1029     * @useinstead ohos.util.RationalNumber.parseRationalNumber
1030     */
1031    constructor(numerator: number, denominator: number);
1032
1033    /**
1034     * A constructor used to create a RationalNumber instance with a given numerator and denominator.
1035     *
1036     * @syscap SystemCapability.Utils.Lang
1037     * @since 9
1038     */
1039    /**
1040     * A constructor used to create a RationalNumber instance with a given numerator and denominator.
1041     *
1042     * @syscap SystemCapability.Utils.Lang
1043     * @crossplatform
1044     * @since 10
1045     */
1046    /**
1047     * A constructor used to create a RationalNumber instance with a given numerator and denominator.
1048     *
1049     * @syscap SystemCapability.Utils.Lang
1050     * @crossplatform
1051     * @atomicservice
1052     * @since 12
1053     */
1054    constructor();
1055
1056    /**
1057     * Used to create a RationalNumber instance with a given numerator and denominator.
1058     *
1059     * @param { number } numerator - An integer number
1060     * @param { number } denominator - An integer number
1061     * @returns { RationalNumber }
1062     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1063     * 1.Mandatory parameters are left unspecified;
1064     * 2.Incorrect parameter types.
1065     * @syscap SystemCapability.Utils.Lang
1066     * @since 9
1067     */
1068    /**
1069     * Used to create a RationalNumber instance with a given numerator and denominator.
1070     *
1071     * @param { number } numerator - An integer number
1072     * @param { number } denominator - An integer number
1073     * @returns { RationalNumber }
1074     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1075     * 1.Mandatory parameters are left unspecified;
1076     * 2.Incorrect parameter types.
1077     * @syscap SystemCapability.Utils.Lang
1078     * @crossplatform
1079     * @since 10
1080     */
1081    /**
1082     * Used to create a RationalNumber instance with a given numerator and denominator.
1083     *
1084     * @param { number } numerator - An integer number
1085     * @param { number } denominator - An integer number
1086     * @returns { RationalNumber }
1087     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1088     * 1.Mandatory parameters are left unspecified;
1089     * 2.Incorrect parameter types.
1090     * @syscap SystemCapability.Utils.Lang
1091     * @crossplatform
1092     * @atomicservice
1093     * @since 12
1094     */
1095    static parseRationalNumber(numerator: number, denominator: number): RationalNumber;
1096
1097    /**
1098     * Creates a RationalNumber object based on a given string.
1099     *
1100     * @param { string } rationalString - String Expression of Rational Numbers
1101     * @returns { RationalNumber } Returns a RationalNumber object generated based on the given string.
1102     * @throws { BusinessError } 401 - The type of rationalString must be string.
1103     * @syscap SystemCapability.Utils.Lang
1104     * @since 8
1105     */
1106    /**
1107     * Creates a RationalNumber object based on a given string.
1108     *
1109     * @param { string } rationalString - String Expression of Rational Numbers
1110     * @returns { RationalNumber } Returns a RationalNumber object generated based on the given string.
1111     * @throws { BusinessError } 401 - The type of rationalString must be string.
1112     * @syscap SystemCapability.Utils.Lang
1113     * @crossplatform
1114     * @since 10
1115     */
1116    /**
1117     * Creates a RationalNumber object based on a given string.
1118     *
1119     * @param { string } rationalString - String Expression of Rational Numbers
1120     * @returns { RationalNumber } Returns a RationalNumber object generated based on the given string.
1121     * @throws { BusinessError } 401 - The type of rationalString must be string.
1122     * @syscap SystemCapability.Utils.Lang
1123     * @crossplatform
1124     * @atomicservice
1125     * @since 12
1126     */
1127    static createRationalFromString(rationalString: string): RationalNumber;
1128
1129    /**
1130     * Compares the current RationalNumber object to the given object.
1131     *
1132     * @param { RationalNumber } another - An object of other rational numbers
1133     * @returns { number } Returns 0 or 1, or -1, depending on the comparison.
1134     * @syscap SystemCapability.Utils.Lang
1135     * @since 8
1136     * @deprecated since 9
1137     * @useinstead ohos.util.compare
1138     */
1139    compareTo(another: RationalNumber): number;
1140
1141    /**
1142     * Compares the current RationalNumber object to the given object.
1143     *
1144     * @param { RationalNumber } another - An object of other rational numbers
1145     * @returns { number } Returns 0 or 1, or -1, depending on the comparison.
1146     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1147     * 1.Mandatory parameters are left unspecified;
1148     * 2.Incorrect parameter types.
1149     * @syscap SystemCapability.Utils.Lang
1150     * @since 9
1151     */
1152    /**
1153     * Compares the current RationalNumber object to the given object.
1154     *
1155     * @param { RationalNumber } another - An object of other rational numbers
1156     * @returns { number } Returns 0 or 1, or -1, depending on the comparison.
1157     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1158     * 1.Mandatory parameters are left unspecified;
1159     * 2.Incorrect parameter types.
1160     * @syscap SystemCapability.Utils.Lang
1161     * @crossplatform
1162     * @since 10
1163     */
1164    /**
1165     * Compares the current RationalNumber object to the given object.
1166     *
1167     * @param { RationalNumber } another - An object of other rational numbers
1168     * @returns { number } Returns 0 or 1, or -1, depending on the comparison.
1169     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1170     * 1.Mandatory parameters are left unspecified;
1171     * 2.Incorrect parameter types.
1172     * @syscap SystemCapability.Utils.Lang
1173     * @crossplatform
1174     * @atomicservice
1175     * @since 12
1176     */
1177    compare(another: RationalNumber): number;
1178
1179    /**
1180     * Compares two objects for equality.
1181     *
1182     * @param { Object } obj - An object
1183     * @returns { boolean } Returns true if the given object is the same as the current object; Otherwise, false is returned.
1184     * @syscap SystemCapability.Utils.Lang
1185     * @since 8
1186     */
1187    /**
1188     * Compares two objects for equality.
1189     *
1190     * @param { Object } obj - An object
1191     * @returns { boolean } Returns true if the given object is the same as the current object; Otherwise, false is returned.
1192     * @syscap SystemCapability.Utils.Lang
1193     * @crossplatform
1194     * @since 10
1195     */
1196    /**
1197     * Compares two objects for equality.
1198     *
1199     * @param { Object } obj - An object
1200     * @returns { boolean } Returns true if the given object is the same as the current object; Otherwise, false is returned.
1201     * @syscap SystemCapability.Utils.Lang
1202     * @crossplatform
1203     * @atomicservice
1204     * @since 12
1205     */
1206    equals(obj: Object): boolean;
1207
1208    /**
1209     * Gets integer and floating-point values of a rational number object.
1210     *
1211     * @returns { number } Returns the integer and floating-point values of a rational number object.
1212     * @syscap SystemCapability.Utils.Lang
1213     * @since 8
1214     */
1215    /**
1216     * Gets integer and floating-point values of a rational number object.
1217     *
1218     * @returns { number } Returns the integer and floating-point values of a rational number object.
1219     * @syscap SystemCapability.Utils.Lang
1220     * @crossplatform
1221     * @since 10
1222     */
1223    /**
1224     * Gets integer and floating-point values of a rational number object.
1225     *
1226     * @returns { number } Returns the integer and floating-point values of a rational number object.
1227     * @syscap SystemCapability.Utils.Lang
1228     * @crossplatform
1229     * @atomicservice
1230     * @since 12
1231     */
1232    valueOf(): number;
1233
1234    /**
1235     * Get the greatest common divisor of two integers.
1236     *
1237     * @param { number } number1 - Is an integer.
1238     * @param { number } number2 - Is an integer.
1239     * @returns { number } Returns the greatest common divisor of two integers, integer type.
1240     * @syscap SystemCapability.Utils.Lang
1241     * @since 8
1242     * @deprecated since 9
1243     * @useinstead ohos.util.getCommonFactor
1244     */
1245    static getCommonDivisor(number1: number, number2: number): number;
1246
1247    /**
1248     * Get the greatest common factor of two integers.
1249     *
1250     * @param { number } number1 - Is an integer.
1251     * @param { number } number2 - Is an integer.
1252     * @returns { number } Returns the greatest common factor of two integers, integer type.
1253     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1254     * 1.Mandatory parameters are left unspecified;
1255     * 2.Incorrect parameter types.
1256     * @syscap SystemCapability.Utils.Lang
1257     * @since 9
1258     */
1259    /**
1260     * Get the greatest common factor of two integers.
1261     *
1262     * @param { number } number1 - Is an integer.
1263     * @param { number } number2 - Is an integer.
1264     * @returns { number } Returns the greatest common factor of two integers, integer type.
1265     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1266     * 1.Mandatory parameters are left unspecified;
1267     * 2.Incorrect parameter types.
1268     * @syscap SystemCapability.Utils.Lang
1269     * @crossplatform
1270     * @since 10
1271     */
1272    /**
1273     * Get the greatest common factor of two integers.
1274     *
1275     * @param { number } number1 - Is an integer.
1276     * @param { number } number2 - Is an integer.
1277     * @returns { number } Returns the greatest common factor of two integers, integer type.
1278     * @throws { BusinessError } 401 - Parameter error. Possible causes:
1279     * 1.Mandatory parameters are left unspecified;
1280     * 2.Incorrect parameter types.
1281     * @syscap SystemCapability.Utils.Lang
1282     * @crossplatform
1283     * @atomicservice
1284     * @since 12
1285     */
1286    static getCommonFactor(number1: number, number2: number): number;
1287
1288    /**
1289     * Gets the denominator of the current object.
1290     *
1291     * @returns { number } Returns the denominator of the current object.
1292     * @syscap SystemCapability.Utils.Lang
1293     * @since 8
1294     */
1295    /**
1296     * Gets the denominator of the current object.
1297     *
1298     * @returns { number } Returns the denominator of the current object.
1299     * @syscap SystemCapability.Utils.Lang
1300     * @crossplatform
1301     * @since 10
1302     */
1303    /**
1304     * Gets the denominator of the current object.
1305     *
1306     * @returns { number } Returns the denominator of the current object.
1307     * @syscap SystemCapability.Utils.Lang
1308     * @crossplatform
1309     * @atomicservice
1310     * @since 12
1311     */
1312    getDenominator(): number;
1313
1314    /**
1315     * Gets the numerator of the current object.
1316     *
1317     * @returns { number } Returns the numerator of the current object.
1318     * @syscap SystemCapability.Utils.Lang
1319     * @since 8
1320     */
1321    /**
1322     * Gets the numerator of the current object.
1323     *
1324     * @returns { number } Returns the numerator of the current object.
1325     * @syscap SystemCapability.Utils.Lang
1326     * @crossplatform
1327     * @since 10
1328     */
1329    /**
1330     * Gets the numerator of the current object.
1331     *
1332     * @returns { number } Returns the numerator of the current object.
1333     * @syscap SystemCapability.Utils.Lang
1334     * @crossplatform
1335     * @atomicservice
1336     * @since 12
1337     */
1338    getNumerator(): number;
1339
1340    /**
1341     * Checks whether the current RationalNumber object represents an infinite value.
1342     *
1343     * @returns { boolean } If the denominator is not 0, true is returned. Otherwise, false is returned.
1344     * @syscap SystemCapability.Utils.Lang
1345     * @since 8
1346     */
1347    /**
1348     * Checks whether the current RationalNumber object represents an infinite value.
1349     *
1350     * @returns { boolean } If the denominator is not 0, true is returned. Otherwise, false is returned.
1351     * @syscap SystemCapability.Utils.Lang
1352     * @crossplatform
1353     * @since 10
1354     */
1355    /**
1356     * Checks whether the current RationalNumber object represents an infinite value.
1357     *
1358     * @returns { boolean } If the denominator is not 0, true is returned. Otherwise, false is returned.
1359     * @syscap SystemCapability.Utils.Lang
1360     * @crossplatform
1361     * @atomicservice
1362     * @since 12
1363     */
1364    isFinite(): boolean;
1365
1366    /**
1367     * Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value.
1368     *
1369     * @returns { boolean } If both the denominator and numerator are 0, true is returned. Otherwise, false is returned.
1370     * @syscap SystemCapability.Utils.Lang
1371     * @since 8
1372     */
1373    /**
1374     * Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value.
1375     *
1376     * @returns { boolean } If both the denominator and numerator are 0, true is returned. Otherwise, false is returned.
1377     * @syscap SystemCapability.Utils.Lang
1378     * @crossplatform
1379     * @since 10
1380     */
1381    /**
1382     * Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value.
1383     *
1384     * @returns { boolean } If both the denominator and numerator are 0, true is returned. Otherwise, false is returned.
1385     * @syscap SystemCapability.Utils.Lang
1386     * @crossplatform
1387     * @atomicservice
1388     * @since 12
1389     */
1390    isNaN(): boolean;
1391
1392    /**
1393     * Checks whether the current RationalNumber object represents the value 0.
1394     *
1395     * @returns { boolean } If the value represented by the current object is 0, true is returned. Otherwise, false is returned.
1396     * @syscap SystemCapability.Utils.Lang
1397     * @since 8
1398     */
1399    /**
1400     * Checks whether the current RationalNumber object represents the value 0.
1401     *
1402     * @returns { boolean } If the value represented by the current object is 0, true is returned. Otherwise, false is returned.
1403     * @syscap SystemCapability.Utils.Lang
1404     * @crossplatform
1405     * @since 10
1406     */
1407    /**
1408     * Checks whether the current RationalNumber object represents the value 0.
1409     *
1410     * @returns { boolean } If the value represented by the current object is 0, true is returned. Otherwise, false is returned.
1411     * @syscap SystemCapability.Utils.Lang
1412     * @crossplatform
1413     * @atomicservice
1414     * @since 12
1415     */
1416    isZero(): boolean;
1417
1418    /**
1419     * Obtains a string representation of the current RationalNumber object.
1420     *
1421     * @returns { string } Returns a string representation of the current RationalNumber object.
1422     * @syscap SystemCapability.Utils.Lang
1423     * @since 8
1424     */
1425    /**
1426     * Obtains a string representation of the current RationalNumber object.
1427     *
1428     * @returns { string } Returns a string representation of the current RationalNumber object.
1429     * @syscap SystemCapability.Utils.Lang
1430     * @crossplatform
1431     * @since 10
1432     */
1433    /**
1434     * Obtains a string representation of the current RationalNumber object.
1435     *
1436     * @returns { string } Returns a string representation of the current RationalNumber object.
1437     * @syscap SystemCapability.Utils.Lang
1438     * @crossplatform
1439     * @atomicservice
1440     * @since 12
1441     */
1442    toString(): string;
1443  }
1444
1445  /**
1446   * The LruBuffer algorithm replaces the least used data with new data when the buffer space is insufficient.
1447   *
1448   * @syscap SystemCapability.Utils.Lang
1449   * @since 8
1450   * @deprecated since 9
1451   * @useinstead ohos.util.LRUCache
1452   */
1453  class LruBuffer<K, V> {
1454    /**
1455     * Default constructor used to create a new LruBuffer instance with the default capacity of 64.
1456     *
1457     * @param { number } capacity - Indicates the capacity to customize for the buffer.
1458     * @syscap SystemCapability.Utils.Lang
1459     * @since 8
1460     * @deprecated since 9
1461     * @useinstead ohos.util.LRUCache.constructor
1462     */
1463    constructor(capacity?: number);
1464
1465    /**
1466     * Updates the buffer capacity to a specified capacity.
1467     *
1468     * @param { number } newCapacity - Indicates the new capacity to set.
1469     * @syscap SystemCapability.Utils.Lang
1470     * @since 8
1471     * @deprecated since 9
1472     * @useinstead ohos.util.LRUCache.updateCapacity
1473     */
1474    updateCapacity(newCapacity: number): void;
1475
1476    /**
1477     * Returns a string representation of the object.
1478     *
1479     * @returns { string } Returns the string representation of the object and outputs the string representation of the object.
1480     * @syscap SystemCapability.Utils.Lang
1481     * @since 8
1482     * @deprecated since 9
1483     * @useinstead ohos.util.LRUCache.toString
1484     */
1485    toString(): string;
1486
1487    /**
1488     * Obtains a list of all values in the current buffer.
1489     *
1490     * @type { number }
1491     * @syscap SystemCapability.Utils.Lang
1492     * @since 8
1493     * @deprecated since 9
1494     * @useinstead ohos.util.LRUCache.length
1495     */
1496    length: number;
1497
1498    /**
1499     * Obtains the capacity of the current buffer.
1500     *
1501     * @returns { number } Returns the capacity of the current buffer.
1502     * @syscap SystemCapability.Utils.Lang
1503     * @since 8
1504     * @deprecated since 9
1505     * @useinstead ohos.util.LRUCache.getCapacity
1506     */
1507    getCapacity(): number;
1508
1509    /**
1510     * Clears key-value pairs from the current buffer.
1511     *
1512     * @syscap SystemCapability.Utils.Lang
1513     * @since 8
1514     * @deprecated since 9
1515     * @useinstead ohos.util.LRUCache.clear
1516     */
1517    clear(): void;
1518
1519    /**
1520     * Obtains the number of times createDefault(Object) returned a value.
1521     *
1522     * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value.
1523     * @syscap SystemCapability.Utils.Lang
1524     * @since 8
1525     * @deprecated since 9
1526     * @useinstead ohos.util.LRUCache.getCreateCount
1527     */
1528    getCreateCount(): number;
1529
1530    /**
1531     * Obtains the number of times that the queried values are not matched.
1532     *
1533     * @returns { number } Returns the number of times that the queried values are not matched.
1534     * @syscap SystemCapability.Utils.Lang
1535     * @since 8
1536     * @deprecated since 9
1537     * @useinstead ohos.util.LRUCache.getMissCount
1538     */
1539    getMissCount(): number;
1540
1541    /**
1542     * Obtains the number of times that values are evicted from the buffer.
1543     *
1544     * @returns { number } Returns the number of times that values are evicted from the buffer.
1545     * @syscap SystemCapability.Utils.Lang
1546     * @since 8
1547     * @deprecated since 9
1548     * @useinstead ohos.util.LRUCache.getRemovalCount
1549     */
1550    getRemovalCount(): number;
1551
1552    /**
1553     * Obtains the number of times that the queried values are successfully matched.
1554     *
1555     * @returns { number } Returns the number of times that the queried values are successfully matched.
1556     * @syscap SystemCapability.Utils.Lang
1557     * @since 8
1558     * @deprecated since 9
1559     * @useinstead ohos.util.LRUCache.getMatchCount
1560     */
1561    getMatchCount(): number;
1562
1563    /**
1564     * Obtains the number of times that values are added to the buffer.
1565     *
1566     * @returns { number } Returns the number of times that values are added to the buffer.
1567     * @syscap SystemCapability.Utils.Lang
1568     * @since 8
1569     * @deprecated since 9
1570     * @useinstead ohos.util.LRUCache.getPutCount
1571     */
1572    getPutCount(): number;
1573
1574    /**
1575     * Checks whether the current buffer is empty.
1576     *
1577     * @returns { boolean } Returns true if the current buffer contains no value.
1578     * @syscap SystemCapability.Utils.Lang
1579     * @since 8
1580     * @deprecated since 9
1581     * @useinstead ohos.util.LRUCache.isEmpty
1582     */
1583    isEmpty(): boolean;
1584
1585    /**
1586     * Obtains the value associated with a specified key.
1587     *
1588     * @param { K } key - Indicates the key to query.
1589     * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise.
1590     * @syscap SystemCapability.Utils.Lang
1591     * @since 8
1592     * @deprecated since 9
1593     * @useinstead ohos.util.LRUCache.get
1594     */
1595    get(key: K): V | undefined;
1596
1597    /**
1598     * Adds a key-value pair to the buffer.
1599     *
1600     * @param { K } key - Indicates the key to add.
1601     * @param { V } value - Indicates the value associated with the key to add.
1602     * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists.
1603     * @syscap SystemCapability.Utils.Lang
1604     * @since 8
1605     * @deprecated since 9
1606     * @useinstead ohos.util.LRUCache.put
1607     */
1608    put(key: K, value: V): V;
1609
1610    /**
1611     * Obtains a list of all values in the current buffer.
1612     *
1613     * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed.
1614     * @syscap SystemCapability.Utils.Lang
1615     * @since 8
1616     * @deprecated since 9
1617     * @useinstead ohos.util.LRUCache.values
1618     */
1619    values(): V[];
1620
1621    /**
1622     * Obtains a list of keys for the values in the current buffer.
1623     *
1624     * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed.
1625     * @syscap SystemCapability.Utils.Lang
1626     * @since 8
1627     * @deprecated since 9
1628     * @useinstead ohos.util.LRUCache.keys
1629     */
1630    keys(): K[];
1631
1632    /**
1633     * Deletes a specified key and its associated value from the current buffer.
1634     *
1635     * @param { K } key - Indicates the key to delete.
1636     * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist.
1637     * @syscap SystemCapability.Utils.Lang
1638     * @since 8
1639     * @deprecated since 9
1640     * @useinstead ohos.util.LRUCache.remove
1641     */
1642    remove(key: K): V | undefined;
1643
1644    /**
1645     * Executes subsequent operations after a value is deleted.
1646     *
1647     * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity,
1648     * and the parameter value is false in other cases.
1649     * @param { K } key - Indicates the deleted key.
1650     * @param { V } value - Indicates the deleted value.
1651     * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object)
1652     * method is called and the key to add already exists. The parameter value is null in other cases.
1653     * @syscap SystemCapability.Utils.Lang
1654     * @since 8
1655     * @deprecated since 9
1656     * @useinstead ohos.util.LRUCache.afterRemoval
1657     */
1658    afterRemoval(isEvict: boolean, key: K, value: V, newValue: V): void;
1659
1660    /**
1661     * Checks whether the current buffer contains a specified key.
1662     *
1663     * @param { K } key - Indicates the key to check.
1664     * @returns { boolean } Returns true if the buffer contains the specified key.
1665     * @syscap SystemCapability.Utils.Lang
1666     * @since 8
1667     * @deprecated since 9
1668     * @useinstead ohos.util.LRUCache.contains
1669     */
1670    contains(key: K): boolean;
1671
1672    /**
1673     * Called after a cache miss to compute a value for the corresponding key.
1674     *
1675     * @param { K } key - Indicates the missed key.
1676     * @returns { V } Returns the value associated with the key.
1677     * @syscap SystemCapability.Utils.Lang
1678     * @since 8
1679     * @deprecated since 9
1680     * @useinstead ohos.util.LRUCache.createDefault
1681     */
1682    createDefault(key: K): V;
1683
1684    /**
1685     * Returns an array of key-value pairs of enumeratable properties of a given object.
1686     *
1687     * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself.
1688     * @syscap SystemCapability.Utils.Lang
1689     * @since 8
1690     * @deprecated since 9
1691     * @useinstead ohos.util.LRUCache.entries
1692     */
1693    entries(): IterableIterator<[K, V]>;
1694
1695    /**
1696     * Specifies the default iterator for an object.
1697     * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs.
1698     * @syscap SystemCapability.Utils.Lang
1699     * @since 8
1700     * @deprecated since 9
1701     * @useinstead ohos.util.LRUCache.[Symbol.iterator]
1702     */
1703    [Symbol.iterator](): IterableIterator<[K, V]>;
1704  }
1705
1706  /**
1707   * The LRUCache algorithm replaces the least used data with new data when the buffer space is insufficient.
1708   *
1709   * @syscap SystemCapability.Utils.Lang
1710   * @since 9
1711   */
1712  /**
1713   * The LRUCache algorithm replaces the least used data with new data when the buffer space is insufficient.
1714   *
1715   * @syscap SystemCapability.Utils.Lang
1716   * @crossplatform
1717   * @since 10
1718   */
1719  /**
1720   * The LRUCache algorithm replaces the least used data with new data when the buffer space is insufficient.
1721   *
1722   * @syscap SystemCapability.Utils.Lang
1723   * @crossplatform
1724   * @atomicservice
1725   * @since 12
1726   */
1727  class LRUCache<K, V> {
1728    /**
1729     * Default constructor used to create a new LruBuffer instance with the default capacity of 64.
1730     *
1731     * @param { number } [capacity] - Indicates the capacity to customize for the buffer.
1732     * @syscap SystemCapability.Utils.Lang
1733     * @since 9
1734     */
1735    /**
1736     * Default constructor used to create a new LruBuffer instance with the default capacity of 64.
1737     *
1738     * @param { number } [capacity] - Indicates the capacity to customize for the buffer.
1739     * @syscap SystemCapability.Utils.Lang
1740     * @crossplatform
1741     * @since 10
1742     */
1743    /**
1744     * Default constructor used to create a new LruBuffer instance with the default capacity of 64.
1745     *
1746     * @param { number } [capacity] - Indicates the capacity to customize for the buffer.
1747     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
1748     * @syscap SystemCapability.Utils.Lang
1749     * @crossplatform
1750     * @atomicservice
1751     * @since 12
1752     */
1753    constructor(capacity?: number);
1754
1755    /**
1756     * Updates the buffer capacity to a specified capacity.
1757     *
1758     * @param { number } newCapacity - Indicates the new capacity to set.
1759     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
1760     * @syscap SystemCapability.Utils.Lang
1761     * @since 9
1762     */
1763    /**
1764     * Updates the buffer capacity to a specified capacity.
1765     *
1766     * @param { number } newCapacity - Indicates the new capacity to set.
1767     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
1768     * @syscap SystemCapability.Utils.Lang
1769     * @crossplatform
1770     * @since 10
1771     */
1772    /**
1773     * Updates the buffer capacity to a specified capacity.
1774     *
1775     * @param { number } newCapacity - Indicates the new capacity to set.
1776     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
1777     * @syscap SystemCapability.Utils.Lang
1778     * @crossplatform
1779     * @atomicservice
1780     * @since 12
1781     */
1782    updateCapacity(newCapacity: number): void;
1783
1784    /**
1785     * Returns a string representation of the object.
1786     *
1787     * @returns { string } Returns the string representation of the object and outputs the string representation of the object.
1788     * @syscap SystemCapability.Utils.Lang
1789     * @since 9
1790     */
1791    /**
1792     * Returns a string representation of the object.
1793     *
1794     * @returns { string } Returns the string representation of the object and outputs the string representation of the object.
1795     * @syscap SystemCapability.Utils.Lang
1796     * @crossplatform
1797     * @since 10
1798     */
1799    /**
1800     * Returns a string representation of the object.
1801     *
1802     * @returns { string } Returns the string representation of the object and outputs the string representation of the object.
1803     * @syscap SystemCapability.Utils.Lang
1804     * @crossplatform
1805     * @atomicservice
1806     * @since 12
1807     */
1808    toString(): string;
1809
1810    /**
1811     * Obtains a list of all values in the current buffer.
1812     *
1813     * @type { number }
1814     * @syscap SystemCapability.Utils.Lang
1815     * @since 9
1816     */
1817    /**
1818     * Obtains a list of all values in the current buffer.
1819     *
1820     * @type { number }
1821     * @syscap SystemCapability.Utils.Lang
1822     * @crossplatform
1823     * @since 10
1824     */
1825    /**
1826     * Obtains a list of all values in the current buffer.
1827     *
1828     * @type { number }
1829     * @syscap SystemCapability.Utils.Lang
1830     * @crossplatform
1831     * @atomicservice
1832     * @since 12
1833     */
1834    length: number;
1835
1836    /**
1837     * Obtains the capacity of the current buffer.
1838     *
1839     * @returns { number } Returns the capacity of the current buffer.
1840     * @syscap SystemCapability.Utils.Lang
1841     * @since 9
1842     */
1843    /**
1844     * Obtains the capacity of the current buffer.
1845     *
1846     * @returns { number } Returns the capacity of the current buffer.
1847     * @syscap SystemCapability.Utils.Lang
1848     * @crossplatform
1849     * @since 10
1850     */
1851    /**
1852     * Obtains the capacity of the current buffer.
1853     *
1854     * @returns { number } Returns the capacity of the current buffer.
1855     * @syscap SystemCapability.Utils.Lang
1856     * @crossplatform
1857     * @atomicservice
1858     * @since 12
1859     */
1860    getCapacity(): number;
1861
1862    /**
1863     * Clears key-value pairs from the current buffer.
1864     *
1865     * @syscap SystemCapability.Utils.Lang
1866     * @since 9
1867     */
1868    /**
1869     * Clears key-value pairs from the current buffer.
1870     *
1871     * @syscap SystemCapability.Utils.Lang
1872     * @crossplatform
1873     * @since 10
1874     */
1875    /**
1876     * Clears key-value pairs from the current buffer.
1877     *
1878     * @syscap SystemCapability.Utils.Lang
1879     * @crossplatform
1880     * @atomicservice
1881     * @since 12
1882     */
1883    clear(): void;
1884
1885    /**
1886     * Obtains the number of times createDefault(Object) returned a value.
1887     *
1888     * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value.
1889     * @syscap SystemCapability.Utils.Lang
1890     * @since 9
1891     */
1892    /**
1893     * Obtains the number of times createDefault(Object) returned a value.
1894     *
1895     * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value.
1896     * @syscap SystemCapability.Utils.Lang
1897     * @crossplatform
1898     * @since 10
1899     */
1900    /**
1901     * Obtains the number of times createDefault(Object) returned a value.
1902     *
1903     * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value.
1904     * @syscap SystemCapability.Utils.Lang
1905     * @crossplatform
1906     * @atomicservice
1907     * @since 12
1908     */
1909    getCreateCount(): number;
1910
1911    /**
1912     * Obtains the number of times that the queried values are not matched.
1913     *
1914     * @returns { number } Returns the number of times that the queried values are not matched.
1915     * @syscap SystemCapability.Utils.Lang
1916     * @since 9
1917     */
1918    /**
1919     * Obtains the number of times that the queried values are not matched.
1920     *
1921     * @returns { number } Returns the number of times that the queried values are not matched.
1922     * @syscap SystemCapability.Utils.Lang
1923     * @crossplatform
1924     * @since 10
1925     */
1926    /**
1927     * Obtains the number of times that the queried values are not matched.
1928     *
1929     * @returns { number } Returns the number of times that the queried values are not matched.
1930     * @syscap SystemCapability.Utils.Lang
1931     * @crossplatform
1932     * @atomicservice
1933     * @since 12
1934     */
1935    getMissCount(): number;
1936
1937    /**
1938     * Obtains the number of times that values are evicted from the buffer.
1939     *
1940     * @returns { number } Returns the number of times that values are evicted from the buffer.
1941     * @syscap SystemCapability.Utils.Lang
1942     * @since 9
1943     */
1944    /**
1945     * Obtains the number of times that values are evicted from the buffer.
1946     *
1947     * @returns { number } Returns the number of times that values are evicted from the buffer.
1948     * @syscap SystemCapability.Utils.Lang
1949     * @crossplatform
1950     * @since 10
1951     */
1952    /**
1953     * Obtains the number of times that values are evicted from the buffer.
1954     *
1955     * @returns { number } Returns the number of times that values are evicted from the buffer.
1956     * @syscap SystemCapability.Utils.Lang
1957     * @crossplatform
1958     * @atomicservice
1959     * @since 12
1960     */
1961    getRemovalCount(): number;
1962
1963    /**
1964     * Obtains the number of times that the queried values are successfully matched.
1965     *
1966     * @returns { number } Returns the number of times that the queried values are successfully matched.
1967     * @syscap SystemCapability.Utils.Lang
1968     * @since 9
1969     */
1970    /**
1971     * Obtains the number of times that the queried values are successfully matched.
1972     *
1973     * @returns { number } Returns the number of times that the queried values are successfully matched.
1974     * @syscap SystemCapability.Utils.Lang
1975     * @crossplatform
1976     * @since 10
1977     */
1978    /**
1979     * Obtains the number of times that the queried values are successfully matched.
1980     *
1981     * @returns { number } Returns the number of times that the queried values are successfully matched.
1982     * @syscap SystemCapability.Utils.Lang
1983     * @crossplatform
1984     * @atomicservice
1985     * @since 12
1986     */
1987    getMatchCount(): number;
1988
1989    /**
1990     * Obtains the number of times that values are added to the buffer.
1991     *
1992     * @returns { number } Returns the number of times that values are added to the buffer.
1993     * @syscap SystemCapability.Utils.Lang
1994     * @since 9
1995     */
1996    /**
1997     * Obtains the number of times that values are added to the buffer.
1998     *
1999     * @returns { number } Returns the number of times that values are added to the buffer.
2000     * @syscap SystemCapability.Utils.Lang
2001     * @crossplatform
2002     * @since 10
2003     */
2004    /**
2005     * Obtains the number of times that values are added to the buffer.
2006     *
2007     * @returns { number } Returns the number of times that values are added to the buffer.
2008     * @syscap SystemCapability.Utils.Lang
2009     * @crossplatform
2010     * @atomicservice
2011     * @since 12
2012     */
2013    getPutCount(): number;
2014
2015    /**
2016     * Checks whether the current buffer is empty.
2017     *
2018     * @returns { boolean } Returns true if the current buffer contains no value.
2019     * @syscap SystemCapability.Utils.Lang
2020     * @since 9
2021     */
2022    /**
2023     * Checks whether the current buffer is empty.
2024     *
2025     * @returns { boolean } Returns true if the current buffer contains no value.
2026     * @syscap SystemCapability.Utils.Lang
2027     * @crossplatform
2028     * @since 10
2029     */
2030    /**
2031     * Checks whether the current buffer is empty.
2032     *
2033     * @returns { boolean } Returns true if the current buffer contains no value.
2034     * @syscap SystemCapability.Utils.Lang
2035     * @crossplatform
2036     * @atomicservice
2037     * @since 12
2038     */
2039    isEmpty(): boolean;
2040
2041    /**
2042     * Obtains the value associated with a specified key.
2043     *
2044     * @param { K } key - Indicates the key to query.
2045     * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise.
2046     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2047     * 1.Mandatory parameters are left unspecified;
2048     * 2.Incorrect parameter types.
2049     * @syscap SystemCapability.Utils.Lang
2050     * @since 9
2051     */
2052    /**
2053     * Obtains the value associated with a specified key.
2054     *
2055     * @param { K } key - Indicates the key to query.
2056     * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise.
2057     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2058     * 1.Mandatory parameters are left unspecified;
2059     * 2.Incorrect parameter types.
2060     * @syscap SystemCapability.Utils.Lang
2061     * @crossplatform
2062     * @since 10
2063     */
2064    /**
2065     * Obtains the value associated with a specified key.
2066     *
2067     * @param { K } key - Indicates the key to query.
2068     * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise.
2069     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2070     * 1.Mandatory parameters are left unspecified;
2071     * 2.Incorrect parameter types.
2072     * @syscap SystemCapability.Utils.Lang
2073     * @crossplatform
2074     * @atomicservice
2075     * @since 12
2076     */
2077    get(key: K): V | undefined;
2078
2079    /**
2080     * Adds a key-value pair to the buffer.
2081     *
2082     * @param { K } key - Indicates the key to add.
2083     * @param { V } value - Indicates the value associated with the key to add.
2084     * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists.
2085     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2086     * 1.Mandatory parameters are left unspecified;
2087     * 2.Incorrect parameter types.
2088     * @syscap SystemCapability.Utils.Lang
2089     * @since 9
2090     */
2091    /**
2092     * Adds a key-value pair to the buffer.
2093     *
2094     * @param { K } key - Indicates the key to add.
2095     * @param { V } value - Indicates the value associated with the key to add.
2096     * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists.
2097     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2098     * 1.Mandatory parameters are left unspecified;
2099     * 2.Incorrect parameter types.
2100     * @syscap SystemCapability.Utils.Lang
2101     * @crossplatform
2102     * @since 10
2103     */
2104    /**
2105     * Adds a key-value pair to the buffer.
2106     *
2107     * @param { K } key - Indicates the key to add.
2108     * @param { V } value - Indicates the value associated with the key to add.
2109     * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists.
2110     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2111     * 1.Mandatory parameters are left unspecified;
2112     * 2.Incorrect parameter types.
2113     * @syscap SystemCapability.Utils.Lang
2114     * @crossplatform
2115     * @atomicservice
2116     * @since 12
2117     */
2118    put(key: K, value: V): V;
2119
2120    /**
2121     * Obtains a list of all values in the current buffer.
2122     *
2123     * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed.
2124     * @syscap SystemCapability.Utils.Lang
2125     * @since 9
2126     */
2127    /**
2128     * Obtains a list of all values in the current buffer.
2129     *
2130     * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed.
2131     * @syscap SystemCapability.Utils.Lang
2132     * @crossplatform
2133     * @since 10
2134     */
2135    /**
2136     * Obtains a list of all values in the current buffer.
2137     *
2138     * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed.
2139     * @syscap SystemCapability.Utils.Lang
2140     * @crossplatform
2141     * @atomicservice
2142     * @since 12
2143     */
2144    values(): V[];
2145
2146    /**
2147     * Obtains a list of keys for the values in the current buffer.
2148     * since 9
2149     *
2150     * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed.
2151     * @syscap SystemCapability.Utils.Lang
2152     * @since 9
2153     */
2154    /**
2155     * Obtains a list of keys for the values in the current buffer.
2156     * since 9
2157     *
2158     * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed.
2159     * @syscap SystemCapability.Utils.Lang
2160     * @crossplatform
2161     * @since 10
2162     */
2163    /**
2164     * Obtains a list of keys for the values in the current buffer.
2165     * since 9
2166     *
2167     * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed.
2168     * @syscap SystemCapability.Utils.Lang
2169     * @crossplatform
2170     * @atomicservice
2171     * @since 12
2172     */
2173    keys(): K[];
2174
2175    /**
2176     * Deletes a specified key and its associated value from the current buffer.
2177     *
2178     * @param { K } key - Indicates the key to delete.
2179     * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist.
2180     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2181     * 1.Mandatory parameters are left unspecified;
2182     * 2.Incorrect parameter types.
2183     * @syscap SystemCapability.Utils.Lang
2184     * @since 9
2185     */
2186    /**
2187     * Deletes a specified key and its associated value from the current buffer.
2188     *
2189     * @param { K } key - Indicates the key to delete.
2190     * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist.
2191     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2192     * 1.Mandatory parameters are left unspecified;
2193     * 2.Incorrect parameter types.
2194     * @syscap SystemCapability.Utils.Lang
2195     * @crossplatform
2196     * @since 10
2197     */
2198    /**
2199     * Deletes a specified key and its associated value from the current buffer.
2200     *
2201     * @param { K } key - Indicates the key to delete.
2202     * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist.
2203     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2204     * 1.Mandatory parameters are left unspecified;
2205     * 2.Incorrect parameter types.
2206     * @syscap SystemCapability.Utils.Lang
2207     * @crossplatform
2208     * @atomicservice
2209     * @since 12
2210     */
2211    remove(key: K): V | undefined;
2212
2213    /**
2214     * Executes subsequent operations after a value is deleted.
2215     *
2216     * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity,
2217     * and the parameter value is false in other cases.
2218     * @param { K } key - Indicates the deleted key.
2219     * @param { V } value - Indicates the deleted value.
2220     * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object)
2221     * method is called and the key to add already exists. The parameter value is null in other cases.
2222     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2223     * 1.Mandatory parameters are left unspecified;
2224     * 2.Incorrect parameter types.
2225     * @syscap SystemCapability.Utils.Lang
2226     * @since 9
2227     */
2228    /**
2229     * Executes subsequent operations after a value is deleted.
2230     *
2231     * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity,
2232     * and the parameter value is false in other cases.
2233     * @param { K } key - Indicates the deleted key.
2234     * @param { V } value - Indicates the deleted value.
2235     * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object)
2236     * method is called and the key to add already exists. The parameter value is null in other cases.
2237     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2238     * 1.Mandatory parameters are left unspecified;
2239     * 2.Incorrect parameter types.
2240     * @syscap SystemCapability.Utils.Lang
2241     * @crossplatform
2242     * @since 10
2243     */
2244    /**
2245     * Executes subsequent operations after a value is deleted.
2246     *
2247     * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity,
2248     * and the parameter value is false in other cases.
2249     * @param { K } key - Indicates the deleted key.
2250     * @param { V } value - Indicates the deleted value.
2251     * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object)
2252     * method is called and the key to add already exists. The parameter value is null in other cases.
2253     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2254     * 1.Mandatory parameters are left unspecified;
2255     * 2.Incorrect parameter types.
2256     * @syscap SystemCapability.Utils.Lang
2257     * @crossplatform
2258     * @atomicservice
2259     * @since 12
2260     */
2261    afterRemoval(isEvict: boolean, key: K, value: V, newValue: V): void;
2262
2263    /**
2264     * Checks whether the current buffer contains a specified key.
2265     *
2266     * @param { K } key - Indicates the key to check.
2267     * @returns { boolean } Returns true if the buffer contains the specified key.
2268     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2269     * 1.Mandatory parameters are left unspecified;
2270     * 2.Incorrect parameter types.
2271     * @syscap SystemCapability.Utils.Lang
2272     * @since 9
2273     */
2274    /**
2275     * Checks whether the current buffer contains a specified key.
2276     *
2277     * @param { K } key - Indicates the key to check.
2278     * @returns { boolean } Returns true if the buffer contains the specified key.
2279     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2280     * 1.Mandatory parameters are left unspecified;
2281     * 2.Incorrect parameter types.
2282     * @syscap SystemCapability.Utils.Lang
2283     * @crossplatform
2284     * @since 10
2285     */
2286    /**
2287     * Checks whether the current buffer contains a specified key.
2288     *
2289     * @param { K } key - Indicates the key to check.
2290     * @returns { boolean } Returns true if the buffer contains the specified key.
2291     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2292     * 1.Mandatory parameters are left unspecified;
2293     * 2.Incorrect parameter types.
2294     * @syscap SystemCapability.Utils.Lang
2295     * @crossplatform
2296     * @atomicservice
2297     * @since 12
2298     */
2299    contains(key: K): boolean;
2300
2301    /**
2302     * Executes subsequent operations if miss to compute a value for the specific key.
2303     *
2304     * @param { K } key - Indicates the missed key.
2305     * @returns { V } Returns the value associated with the key.
2306     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2307     * 1.Mandatory parameters are left unspecified;
2308     * 2.Incorrect parameter types.
2309     * @syscap SystemCapability.Utils.Lang
2310     * @since 9
2311     */
2312    /**
2313     * Executes subsequent operations if miss to compute a value for the specific key.
2314     *
2315     * @param { K } key - Indicates the missed key.
2316     * @returns { V } Returns the value associated with the key.
2317     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2318     * 1.Mandatory parameters are left unspecified;
2319     * 2.Incorrect parameter types.
2320     * @syscap SystemCapability.Utils.Lang
2321     * @crossplatform
2322     * @since 10
2323     */
2324    /**
2325     * Executes subsequent operations if miss to compute a value for the specific key.
2326     *
2327     * @param { K } key - Indicates the missed key.
2328     * @returns { V } Returns the value associated with the key.
2329     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2330     * 1.Mandatory parameters are left unspecified;
2331     * 2.Incorrect parameter types.
2332     * @syscap SystemCapability.Utils.Lang
2333     * @crossplatform
2334     * @atomicservice
2335     * @since 12
2336     */
2337    createDefault(key: K): V;
2338
2339    /**
2340     * Returns an array of key-value pairs of enumeratable properties of a given object.
2341     *
2342     * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself.
2343     * @syscap SystemCapability.Utils.Lang
2344     * @since 9
2345     */
2346    /**
2347     * Returns an array of key-value pairs of enumeratable properties of a given object.
2348     *
2349     * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself.
2350     * @syscap SystemCapability.Utils.Lang
2351     * @crossplatform
2352     * @since 10
2353     */
2354    /**
2355     * Returns an array of key-value pairs of enumeratable properties of a given object.
2356     *
2357     * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself.
2358     * @syscap SystemCapability.Utils.Lang
2359     * @crossplatform
2360     * @atomicservice
2361     * @since 12
2362     */
2363    entries(): IterableIterator<[K, V]>;
2364
2365    /**
2366     * Specifies the default iterator for an object.
2367     *
2368     * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs.
2369     * @syscap SystemCapability.Utils.Lang
2370     * @since 9
2371     */
2372    /**
2373     * Specifies the default iterator for an object.
2374     *
2375     * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs.
2376     * @syscap SystemCapability.Utils.Lang
2377     * @crossplatform
2378     * @since 10
2379     */
2380    /**
2381     * Specifies the default iterator for an object.
2382     *
2383     * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs.
2384     * @syscap SystemCapability.Utils.Lang
2385     * @crossplatform
2386     * @atomicservice
2387     * @since 12
2388     */
2389    [Symbol.iterator](): IterableIterator<[K, V]>;
2390  }
2391
2392  /**
2393   * The ScopeComparable contains comparison methods.
2394   *
2395   * @interface ScopeComparable
2396   * @syscap SystemCapability.Utils.Lang
2397   * @since 7
2398   */
2399  /**
2400   * The ScopeComparable contains comparison methods.
2401   *
2402   * @interface ScopeComparable
2403   * @syscap SystemCapability.Utils.Lang
2404   * @crossplatform
2405   * @since 10
2406   */
2407  /**
2408   * The ScopeComparable contains comparison methods.
2409   *
2410   * @interface ScopeComparable
2411   * @syscap SystemCapability.Utils.Lang
2412   * @crossplatform
2413   * @atomicservice
2414   * @since 12
2415   */
2416  interface ScopeComparable {
2417    /**
2418     * The comparison function is used by the scope.
2419     *
2420     * @param { ScopeComparable } other - Other
2421     * @returns { boolean } Returns whether the current object is greater than or equal to the input object.
2422     * @syscap SystemCapability.Utils.Lang
2423     * @since 8
2424     */
2425    /**
2426     * The comparison function is used by the scope.
2427     *
2428     * @param { ScopeComparable } other - Other
2429     * @returns { boolean } Returns whether the current object is greater than or equal to the input object.
2430     * @syscap SystemCapability.Utils.Lang
2431     * @crossplatform
2432     * @since 10
2433     */
2434    /**
2435     * The comparison function is used by the scope.
2436     *
2437     * @param { ScopeComparable } other - Other
2438     * @returns { boolean } Returns whether the current object is greater than or equal to the input object.
2439     * @syscap SystemCapability.Utils.Lang
2440     * @crossplatform
2441     * @atomicservice
2442     * @since 12
2443     */
2444    compareTo(other: ScopeComparable): boolean;
2445  }
2446
2447  /**
2448   * A type used to denote ScopeComparable or number.
2449   *
2450   * @syscap SystemCapability.Utils.Lang
2451   * @since 8
2452   */
2453  /**
2454   * A type used to denote ScopeComparable or number.
2455   *
2456   * @syscap SystemCapability.Utils.Lang
2457   * @crossplatform
2458   * @since 10
2459   */
2460  /**
2461   * A type used to denote ScopeComparable or number.
2462   *
2463   * @typedef { ScopeComparable | number }
2464   * @syscap SystemCapability.Utils.Lang
2465   * @crossplatform
2466   * @atomicservice
2467   * @since 12
2468   */
2469  type ScopeType = ScopeComparable | number;
2470
2471  /**
2472   * The Scope interface is used to describe the valid range of a field.
2473   *
2474   * @syscap SystemCapability.Utils.Lang
2475   * @since 8
2476   * @deprecated since 9
2477   * @useinstead ohos.util.ScopeHelper
2478   */
2479  class Scope {
2480    /**
2481     * A constructor used to create a Scope instance with the lower and upper bounds specified.
2482     *
2483     * @param { ScopeType } lowerObj - A ScopeType value
2484     * @param { ScopeType } upperObj - A ScopeType value
2485     * @syscap SystemCapability.Utils.Lang
2486     * @since 8
2487     * @deprecated since 9
2488     * @useinstead ohos.util.ScopeHelper.constructor
2489     */
2490    constructor(lowerObj: ScopeType, upperObj: ScopeType);
2491
2492    /**
2493     * Obtains a string representation of the current range.
2494     *
2495     * @returns { string } Returns a string representation of the current range object.
2496     * @syscap SystemCapability.Utils.Lang
2497     * @since 8
2498     * @deprecated since 9
2499     * @useinstead ohos.util.ScopeHelper.toString
2500     */
2501    toString(): string;
2502
2503    /**
2504     * Returns the intersection of a given range and the current range.
2505     *
2506     * @param { Scope } range - A Scope range object
2507     * @returns { Scope } Returns the intersection of a given range and the current range.
2508     * @syscap SystemCapability.Utils.Lang
2509     * @since 8
2510     * @deprecated since 9
2511     * @useinstead ohos.util.ScopeHelper.intersect
2512     */
2513    intersect(range: Scope): Scope;
2514
2515    /**
2516     * Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2517     *
2518     * @param { ScopeType } lowerObj - A ScopeType value
2519     * @param { ScopeType } upperObj - A ScopeType value
2520     * @returns { Scope } Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2521     * @syscap SystemCapability.Utils.Lang
2522     * @since 8
2523     * @deprecated since 9
2524     * @useinstead ohos.util.ScopeHelper.intersect
2525     */
2526    intersect(lowerObj: ScopeType, upperObj: ScopeType): Scope;
2527
2528    /**
2529     * Obtains the upper bound of the current range.
2530     *
2531     * @returns { ScopeType } Returns the upper bound of the current range.
2532     * @syscap SystemCapability.Utils.Lang
2533     * @since 8
2534     * @deprecated since 9
2535     * @useinstead ohos.util.ScopeHelper.getUpper
2536     */
2537    getUpper(): ScopeType;
2538
2539    /**
2540     * Obtains the lower bound of the current range.
2541     *
2542     * @returns { ScopeType } Returns the lower bound of the current range.
2543     * @syscap SystemCapability.Utils.Lang
2544     * @since 8
2545     * @deprecated since 9
2546     * @useinstead ohos.util.ScopeHelper.getLower
2547     */
2548    getLower(): ScopeType;
2549
2550    /**
2551     * Creates the smallest range that includes the current range and the given lower and upper bounds.
2552     *
2553     * @param { ScopeType } lowerObj - A ScopeType value
2554     * @param { ScopeType } upperObj - A ScopeType value
2555     * @returns { Scope } Returns the smallest range that includes the current range and the given lower and upper bounds.
2556     * @syscap SystemCapability.Utils.Lang
2557     * @since 8
2558     * @deprecated since 9
2559     * @useinstead ohos.util.ScopeHelper.expand
2560     */
2561    expand(lowerObj: ScopeType, upperObj: ScopeType): Scope;
2562
2563    /**
2564     * Creates the smallest range that includes the current range and a given range.
2565     *
2566     * @param { Scope } range - A Scope range object
2567     * @returns { Scope } Returns the smallest range that includes the current range and a given range.
2568     * @syscap SystemCapability.Utils.Lang
2569     * @since 8
2570     * @deprecated since 9
2571     * @useinstead ohos.util.ScopeHelper.expand
2572     */
2573    expand(range: Scope): Scope;
2574
2575    /**
2576     * Creates the smallest range that includes the current range and a given value.
2577     *
2578     * @param { ScopeType } value - A ScopeType value
2579     * @returns { Scope } Returns the smallest range that includes the current range and a given value.
2580     * @syscap SystemCapability.Utils.Lang
2581     * @since 8
2582     * @deprecated since 9
2583     * @useinstead ohos.util.ScopeHelper.expand
2584     */
2585    expand(value: ScopeType): Scope;
2586
2587    /**
2588     * Checks whether a given value is within the current range.
2589     *
2590     * @param { ScopeType } value - A ScopeType value
2591     * @returns { boolean } If the value is within the current range return true,otherwise return false.
2592     * @syscap SystemCapability.Utils.Lang
2593     * @since 8
2594     * @deprecated since 9
2595     * @useinstead ohos.util.ScopeHelper.contains
2596     */
2597    contains(value: ScopeType): boolean;
2598
2599    /**
2600     * Checks whether a given range is within the current range.
2601     *
2602     * @param { Scope } range - A Scope range
2603     * @returns { boolean } If the current range is within the given range return true,otherwise return false.
2604     * @syscap SystemCapability.Utils.Lang
2605     * @since 8
2606     * @deprecated since 9
2607     * @useinstead ohos.util.ScopeHelper.contains
2608     */
2609    contains(range: Scope): boolean;
2610
2611    /**
2612     * Clamps a given value to the current range.
2613     *
2614     * @param { ScopeType } value - A ScopeType value
2615     * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range..
2616     * @syscap SystemCapability.Utils.Lang
2617     * @since 8
2618     * @deprecated since 9
2619     * @useinstead ohos.util.ScopeHelper.clamp
2620     */
2621    clamp(value: ScopeType): ScopeType;
2622  }
2623
2624  /**
2625   * The ScopeHelper interface is used to describe the valid range of a field.
2626   *
2627   * @syscap SystemCapability.Utils.Lang
2628   * @since 9
2629   */
2630  /**
2631   * The ScopeHelper interface is used to describe the valid range of a field.
2632   *
2633   * @syscap SystemCapability.Utils.Lang
2634   * @crossplatform
2635   * @since 10
2636   */
2637  /**
2638   * The ScopeHelper interface is used to describe the valid range of a field.
2639   *
2640   * @syscap SystemCapability.Utils.Lang
2641   * @crossplatform
2642   * @atomicservice
2643   * @since 12
2644   */
2645  class ScopeHelper {
2646    /**
2647     * A constructor used to create a Scope instance with the lower and upper bounds specified.
2648     *
2649     * @param { ScopeType } lowerObj - A ScopeType value
2650     * @param { ScopeType } upperObj - A ScopeType value
2651     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2652     * 1.Mandatory parameters are left unspecified;
2653     * 2.Incorrect parameter types.
2654     * @syscap SystemCapability.Utils.Lang
2655     * @since 9
2656     */
2657    /**
2658     * A constructor used to create a Scope instance with the lower and upper bounds specified.
2659     *
2660     * @param { ScopeType } lowerObj - A ScopeType value
2661     * @param { ScopeType } upperObj - A ScopeType value
2662     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2663     * 1.Mandatory parameters are left unspecified;
2664     * 2.Incorrect parameter types.
2665     * @syscap SystemCapability.Utils.Lang
2666     * @crossplatform
2667     * @since 10
2668     */
2669    /**
2670     * A constructor used to create a Scope instance with the lower and upper bounds specified.
2671     *
2672     * @param { ScopeType } lowerObj - A ScopeType value
2673     * @param { ScopeType } upperObj - A ScopeType value
2674     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2675     * 1.Mandatory parameters are left unspecified;
2676     * 2.Incorrect parameter types.
2677     * @syscap SystemCapability.Utils.Lang
2678     * @crossplatform
2679     * @atomicservice
2680     * @since 12
2681     */
2682    constructor(lowerObj: ScopeType, upperObj: ScopeType);
2683
2684    /**
2685     * Obtains a string representation of the current range.
2686     *
2687     * @returns { string } Returns a string representation of the current range object.
2688     * @syscap SystemCapability.Utils.Lang
2689     * @since 9
2690     */
2691    /**
2692     * Obtains a string representation of the current range.
2693     *
2694     * @returns { string } Returns a string representation of the current range object.
2695     * @syscap SystemCapability.Utils.Lang
2696     * @crossplatform
2697     * @since 10
2698     */
2699    /**
2700     * Obtains a string representation of the current range.
2701     *
2702     * @returns { string } Returns a string representation of the current range object.
2703     * @syscap SystemCapability.Utils.Lang
2704     * @crossplatform
2705     * @atomicservice
2706     * @since 12
2707     */
2708    toString(): string;
2709
2710    /**
2711     * Returns the intersection of a given range and the current range.
2712     *
2713     * @param { ScopeHelper } range - A Scope range object
2714     * @returns { ScopeHelper } Returns the intersection of a given range and the current range.
2715     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2716     * 1.Mandatory parameters are left unspecified;
2717     * 2.Incorrect parameter types.
2718     * @syscap SystemCapability.Utils.Lang
2719     * @since 9
2720     */
2721    /**
2722     * Returns the intersection of a given range and the current range.
2723     *
2724     * @param { ScopeHelper } range - A Scope range object
2725     * @returns { ScopeHelper } Returns the intersection of a given range and the current range.
2726     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2727     * 1.Mandatory parameters are left unspecified;
2728     * 2.Incorrect parameter types.
2729     * @syscap SystemCapability.Utils.Lang
2730     * @crossplatform
2731     * @since 10
2732     */
2733    /**
2734     * Returns the intersection of a given range and the current range.
2735     *
2736     * @param { ScopeHelper } range - A Scope range object
2737     * @returns { ScopeHelper } Returns the intersection of a given range and the current range.
2738     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2739     * 1.Mandatory parameters are left unspecified;
2740     * 2.Incorrect parameter types.
2741     * @syscap SystemCapability.Utils.Lang
2742     * @crossplatform
2743     * @atomicservice
2744     * @since 12
2745     */
2746    intersect(range: ScopeHelper): ScopeHelper;
2747
2748    /**
2749     * Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2750     *
2751     * @param { ScopeType } lowerObj - A ScopeType value
2752     * @param { ScopeType } upperObj - A ScopeType value
2753     * @returns { ScopeHelper } Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2754     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2755     * 1.Mandatory parameters are left unspecified;
2756     * 2.Incorrect parameter types.
2757     * @syscap SystemCapability.Utils.Lang
2758     * @since 9
2759     */
2760    /**
2761     * Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2762     *
2763     * @param { ScopeType } lowerObj - A ScopeType value
2764     * @param { ScopeType } upperObj - A ScopeType value
2765     * @returns { ScopeHelper } Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2766     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2767     * 1.Mandatory parameters are left unspecified;
2768     * 2.Incorrect parameter types.
2769     * @syscap SystemCapability.Utils.Lang
2770     * @crossplatform
2771     * @since 10
2772     */
2773    /**
2774     * Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2775     *
2776     * @param { ScopeType } lowerObj - A ScopeType value
2777     * @param { ScopeType } upperObj - A ScopeType value
2778     * @returns { ScopeHelper } Returns the intersection of the current range and the range specified by the given lower and upper bounds.
2779     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2780     * 1.Mandatory parameters are left unspecified;
2781     * 2.Incorrect parameter types.
2782     * @syscap SystemCapability.Utils.Lang
2783     * @crossplatform
2784     * @atomicservice
2785     * @since 12
2786     */
2787    intersect(lowerObj: ScopeType, upperObj: ScopeType): ScopeHelper;
2788
2789    /**
2790     * Obtains the upper bound of the current range.
2791     *
2792     * @returns { ScopeType } Returns the upper bound of the current range.
2793     * @syscap SystemCapability.Utils.Lang
2794     * @since 9
2795     */
2796    /**
2797     * Obtains the upper bound of the current range.
2798     *
2799     * @returns { ScopeType } Returns the upper bound of the current range.
2800     * @syscap SystemCapability.Utils.Lang
2801     * @crossplatform
2802     * @since 10
2803     */
2804    /**
2805     * Obtains the upper bound of the current range.
2806     *
2807     * @returns { ScopeType } Returns the upper bound of the current range.
2808     * @syscap SystemCapability.Utils.Lang
2809     * @crossplatform
2810     * @atomicservice
2811     * @since 12
2812     */
2813    getUpper(): ScopeType;
2814
2815    /**
2816     * Obtains the lower bound of the current range.
2817     *
2818     * @returns { ScopeType } Returns the lower bound of the current range.
2819     * @syscap SystemCapability.Utils.Lang
2820     * @since 9
2821     */
2822    /**
2823     * Obtains the lower bound of the current range.
2824     *
2825     * @returns { ScopeType } Returns the lower bound of the current range.
2826     * @syscap SystemCapability.Utils.Lang
2827     * @crossplatform
2828     * @since 10
2829     */
2830    /**
2831     * Obtains the lower bound of the current range.
2832     *
2833     * @returns { ScopeType } Returns the lower bound of the current range.
2834     * @syscap SystemCapability.Utils.Lang
2835     * @crossplatform
2836     * @atomicservice
2837     * @since 12
2838     */
2839    getLower(): ScopeType;
2840
2841    /**
2842     * Creates the smallest range that includes the current range and the given lower and upper bounds.
2843     *
2844     * @param { ScopeType } lowerObj - A ScopeType value
2845     * @param { ScopeType } upperObj - A ScopeType value
2846     * @returns { ScopeHelper } Returns the smallest range that includes the current range and the given lower and upper bounds.
2847     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2848     * 1.Mandatory parameters are left unspecified;
2849     * 2.Incorrect parameter types.
2850     * @syscap SystemCapability.Utils.Lang
2851     * @since 9
2852     */
2853    /**
2854     * Creates the smallest range that includes the current range and the given lower and upper bounds.
2855     *
2856     * @param { ScopeType } lowerObj - A ScopeType value
2857     * @param { ScopeType } upperObj - A ScopeType value
2858     * @returns { ScopeHelper } Returns the smallest range that includes the current range and the given lower and upper bounds.
2859     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2860     * 1.Mandatory parameters are left unspecified;
2861     * 2.Incorrect parameter types.
2862     * @syscap SystemCapability.Utils.Lang
2863     * @atomicservice
2864     * @since 12
2865     */
2866    expand(lowerObj: ScopeType, upperObj: ScopeType): ScopeHelper;
2867
2868    /**
2869     * Creates the smallest range that includes the current range and a given range.
2870     *
2871     * @param { ScopeHelper } range - A Scope range object
2872     * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given range.
2873     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2874     * 1.Mandatory parameters are left unspecified;
2875     * 2.Incorrect parameter types.
2876     * @syscap SystemCapability.Utils.Lang
2877     * @since 9
2878     */
2879    /**
2880     * Creates the smallest range that includes the current range and a given range.
2881     *
2882     * @param { ScopeHelper } range - A Scope range object
2883     * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given range.
2884     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2885     * 1.Mandatory parameters are left unspecified;
2886     * 2.Incorrect parameter types.
2887     * @syscap SystemCapability.Utils.Lang
2888     * @crossplatform
2889     * @since 10
2890     */
2891    /**
2892     * Creates the smallest range that includes the current range and a given range.
2893     *
2894     * @param { ScopeHelper } range - A Scope range object
2895     * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given range.
2896     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2897     * 1.Mandatory parameters are left unspecified;
2898     * 2.Incorrect parameter types.
2899     * @syscap SystemCapability.Utils.Lang
2900     * @crossplatform
2901     * @atomicservice
2902     * @since 12
2903     */
2904    expand(range: ScopeHelper): ScopeHelper;
2905
2906    /**
2907     * Creates the smallest range that includes the current range and a given value.
2908     *
2909     * @param { ScopeType } value - A ScopeType value
2910     * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given value.
2911     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2912     * 1.Mandatory parameters are left unspecified;
2913     * 2.Incorrect parameter types.
2914     * @syscap SystemCapability.Utils.Lang
2915     * @since 9
2916     */
2917    /**
2918     * Creates the smallest range that includes the current range and a given value.
2919     *
2920     * @param { ScopeType } value - A ScopeType value
2921     * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given value.
2922     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2923     * 1.Mandatory parameters are left unspecified;
2924     * 2.Incorrect parameter types.
2925     * @syscap SystemCapability.Utils.Lang
2926     * @crossplatform
2927     * @since 10
2928     */
2929    /**
2930     * Creates the smallest range that includes the current range and a given value.
2931     *
2932     * @param { ScopeType } value - A ScopeType value
2933     * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given value.
2934     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2935     * 1.Mandatory parameters are left unspecified;
2936     * 2.Incorrect parameter types.
2937     * @syscap SystemCapability.Utils.Lang
2938     * @crossplatform
2939     * @atomicservice
2940     * @since 12
2941     */
2942    expand(value: ScopeType): ScopeHelper;
2943
2944    /**
2945     * Checks whether a given value is within the current range.
2946     *
2947     * @param { ScopeType } value - A ScopeType value
2948     * @returns { boolean } If the value is within the current range return true,otherwise return false.
2949     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2950     * 1.Mandatory parameters are left unspecified;
2951     * 2.Incorrect parameter types.
2952     * @syscap SystemCapability.Utils.Lang
2953     * @since 9
2954     */
2955    /**
2956     * Checks whether a given value is within the current range.
2957     *
2958     * @param { ScopeType } value - A ScopeType value
2959     * @returns { boolean } If the value is within the current range return true,otherwise return false.
2960     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2961     * 1.Mandatory parameters are left unspecified;
2962     * 2.Incorrect parameter types.
2963     * @syscap SystemCapability.Utils.Lang
2964     * @crossplatform
2965     * @since 10
2966     */
2967    /**
2968     * Checks whether a given value is within the current range.
2969     *
2970     * @param { ScopeType } value - A ScopeType value
2971     * @returns { boolean } If the value is within the current range return true,otherwise return false.
2972     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2973     * 1.Mandatory parameters are left unspecified;
2974     * 2.Incorrect parameter types.
2975     * @syscap SystemCapability.Utils.Lang
2976     * @crossplatform
2977     * @atomicservice
2978     * @since 12
2979     */
2980    contains(value: ScopeType): boolean;
2981
2982    /**
2983     * Checks whether a given range is within the current range.
2984     *
2985     * @param { ScopeHelper } range - A Scope range
2986     * @returns { boolean } If the current range is within the given range return true,otherwise return false.
2987     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2988     * 1.Mandatory parameters are left unspecified;
2989     * 2.Incorrect parameter types.
2990     * @syscap SystemCapability.Utils.Lang
2991     * @since 9
2992     */
2993    /**
2994     * Checks whether a given range is within the current range.
2995     *
2996     * @param { ScopeHelper } range - A Scope range
2997     * @returns { boolean } If the current range is within the given range return true,otherwise return false.
2998     * @throws { BusinessError } 401 - Parameter error. Possible causes:
2999     * 1.Mandatory parameters are left unspecified;
3000     * 2.Incorrect parameter types.
3001     * @syscap SystemCapability.Utils.Lang
3002     * @crossplatform
3003     * @since 10
3004     */
3005    /**
3006     * Checks whether a given range is within the current range.
3007     *
3008     * @param { ScopeHelper } range - A Scope range
3009     * @returns { boolean } If the current range is within the given range return true,otherwise return false.
3010     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3011     * 1.Mandatory parameters are left unspecified;
3012     * 2.Incorrect parameter types.
3013     * @syscap SystemCapability.Utils.Lang
3014     * @crossplatform
3015     * @atomicservice
3016     * @since 12
3017     */
3018    contains(range: ScopeHelper): boolean;
3019
3020    /**
3021     * Clamps a given value to the current range.
3022     *
3023     * @param { ScopeType } value - A ScopeType value
3024     * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range.
3025     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3026     * 1.Mandatory parameters are left unspecified;
3027     * 2.Incorrect parameter types.
3028     * @syscap SystemCapability.Utils.Lang
3029     * @since 9
3030     */
3031    /**
3032     * Clamps a given value to the current range.
3033     *
3034     * @param { ScopeType } value - A ScopeType value
3035     * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range.
3036     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3037     * 1.Mandatory parameters are left unspecified;
3038     * 2.Incorrect parameter types.
3039     * @syscap SystemCapability.Utils.Lang
3040     * @crossplatform
3041     * @since 10
3042     */
3043    /**
3044     * Clamps a given value to the current range.
3045     *
3046     * @param { ScopeType } value - A ScopeType value
3047     * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range.
3048     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3049     * 1.Mandatory parameters are left unspecified;
3050     * 2.Incorrect parameter types.
3051     * @syscap SystemCapability.Utils.Lang
3052     * @crossplatform
3053     * @atomicservice
3054     * @since 12
3055     */
3056    clamp(value: ScopeType): ScopeType;
3057  }
3058
3059  /**
3060   * Decodes a Base64 encoded String or input u8 array into a newly-allocated
3061   * u8 array using the Base64 encoding scheme.
3062   *
3063   * @syscap SystemCapability.Utils.Lang
3064   * @since 8
3065   * @deprecated since 9
3066   * @useinstead ohos.util.Base64Helper
3067   */
3068  class Base64 {
3069    /**
3070     * Constructor for creating base64 encoding and decoding
3071     *
3072     * @syscap SystemCapability.Utils.Lang
3073     * @since 8
3074     * @deprecated since 9
3075     * @useinstead ohos.util.Base64Helper.constructor
3076     */
3077    constructor();
3078
3079    /**
3080     * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3081     *
3082     * @param { Uint8Array } src - A Uint8Array value
3083     * @returns { Uint8Array } Return the encoded new Uint8Array.
3084     * @syscap SystemCapability.Utils.Lang
3085     * @since 8
3086     * @deprecated since 9
3087     * @useinstead ohos.util.Base64Helper.encodeSync
3088     */
3089    encodeSync(src: Uint8Array): Uint8Array;
3090
3091    /**
3092     * Encodes the specified byte array into a String using the Base64 encoding scheme.
3093     *
3094     * @param { Uint8Array } src - A Uint8Array value
3095     * @returns { string } Return the encoded string.
3096     * @syscap SystemCapability.Utils.Lang
3097     * @since 8
3098     * @deprecated since 9
3099     * @useinstead ohos.util.Base64Helper.encodeToStringSync
3100     */
3101    encodeToStringSync(src: Uint8Array): string;
3102
3103    /**
3104     * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3105     *
3106     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3107     * @returns { Uint8Array } Return the decoded Uint8Array.
3108     * @syscap SystemCapability.Utils.Lang
3109     * @since 8
3110     * @deprecated since 9
3111     * @useinstead ohos.util.Base64Helper.decodeSync
3112     */
3113    decodeSync(src: Uint8Array | string): Uint8Array;
3114
3115    /**
3116     * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme.
3117     *
3118     * @param { Uint8Array } src - A Uint8Array value
3119     * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array.
3120     * @syscap SystemCapability.Utils.Lang
3121     * @since 8
3122     * @deprecated since 9
3123     * @useinstead ohos.util.Base64Helper.encode
3124     */
3125    encode(src: Uint8Array): Promise<Uint8Array>;
3126
3127    /**
3128     * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme.
3129     *
3130     * @param { Uint8Array } src - A Uint8Array value
3131     * @returns { Promise<string> } Returns the encoded asynchronous string.
3132     * @syscap SystemCapability.Utils.Lang
3133     * @since 8
3134     * @deprecated since 9
3135     * @useinstead ohos.util.Base64Helper.encodeToString
3136     */
3137    encodeToString(src: Uint8Array): Promise<string>;
3138
3139    /**
3140     * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array.
3141     *
3142     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3143     * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array.
3144     * @syscap SystemCapability.Utils.Lang
3145     * @since 8
3146     * @deprecated since 9
3147     * @useinstead ohos.util.Base64Helper.decode
3148     */
3149    decode(src: Uint8Array | string): Promise<Uint8Array>;
3150  }
3151
3152  /**
3153   * The Type represents two different encoding formats for base64
3154   *
3155   * @enum { number } Type
3156   * @syscap SystemCapability.Utils.Lang
3157   * @crossplatform
3158   * @since 10
3159   */
3160  /**
3161   * The Type represents two different encoding formats for base64
3162   *
3163   * @enum { number } Type
3164   * @syscap SystemCapability.Utils.Lang
3165   * @crossplatform
3166   * @atomicservice
3167   * @since 11
3168   */
3169  /**
3170   * The Type represents four different encoding formats for base64
3171   *
3172   * @enum { number } Type
3173   * @syscap SystemCapability.Utils.Lang
3174   * @crossplatform
3175   * @atomicservice
3176   * @since 12
3177   */
3178  enum Type {
3179    /**
3180     * The value indicates that the encoding format of base64 is BASIC
3181     * @syscap SystemCapability.Utils.Lang
3182     * @crossplatform
3183     * @since 10
3184     */
3185    /**
3186     * The value indicates that the encoding format of base64 is BASIC
3187     * @syscap SystemCapability.Utils.Lang
3188     * @crossplatform
3189     * @atomicservice
3190     * @since 11
3191     */
3192    BASIC,
3193    /**
3194     * The value indicates that the encoding format of base64 is MIME
3195     * @syscap SystemCapability.Utils.Lang
3196     * @crossplatform
3197     * @since 10
3198     */
3199    /**
3200     * The value indicates that the encoding format of base64 is MIME
3201     * @syscap SystemCapability.Utils.Lang
3202     * @crossplatform
3203     * @atomicservice
3204     * @since 11
3205     */
3206    MIME,
3207    /**
3208     * The value indicates that the encoding format of base64 is BASIC_URL_SAFE
3209     * @syscap SystemCapability.Utils.Lang
3210     * @crossplatform
3211     * @atomicservice
3212     * @since 12
3213     */
3214    BASIC_URL_SAFE,
3215    /**
3216     * The value indicates that the encoding format of base64 is MIME_URL_SAFE
3217     * @syscap SystemCapability.Utils.Lang
3218     * @crossplatform
3219     * @atomicservice
3220     * @since 12
3221     */
3222    MIME_URL_SAFE
3223  }
3224
3225  /**
3226   * Decodes a Base64 encoded String or input u8 array into a newly-allocated
3227   * u8 array using the Base64 encoding scheme.
3228   *
3229   * @syscap SystemCapability.Utils.Lang
3230   * @since 9
3231   */
3232  /**
3233   * Decodes a Base64 encoded String or input u8 array into a newly-allocated
3234   * u8 array using the Base64 encoding scheme.
3235   *
3236   * @syscap SystemCapability.Utils.Lang
3237   * @crossplatform
3238   * @since 10
3239   */
3240  /**
3241   * Decodes a Base64 encoded String or input u8 array into a newly-allocated
3242   * u8 array using the Base64 encoding scheme.
3243   *
3244   * @syscap SystemCapability.Utils.Lang
3245   * @crossplatform
3246   * @atomicservice
3247   * @since 11
3248   */
3249  class Base64Helper {
3250    /**
3251     * Constructor for creating base64 encoding and decoding
3252     *
3253     * @syscap SystemCapability.Utils.Lang
3254     * @since 9
3255     */
3256    /**
3257     * Constructor for creating base64 encoding and decoding
3258     *
3259     * @syscap SystemCapability.Utils.Lang
3260     * @crossplatform
3261     * @since 10
3262     */
3263    /**
3264     * Constructor for creating base64 encoding and decoding
3265     *
3266     * @syscap SystemCapability.Utils.Lang
3267     * @crossplatform
3268     * @atomicservice
3269     * @since 11
3270     */
3271    constructor();
3272
3273    /**
3274     * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3275     *
3276     * @param { Uint8Array } src - A Uint8Array value
3277     * @returns { Uint8Array } Return the encoded new Uint8Array.
3278     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3279     * 1.Mandatory parameters are left unspecified;
3280     * 2.Incorrect parameter types.
3281     * @syscap SystemCapability.Utils.Lang
3282     * @since 9
3283     */
3284    /**
3285     * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3286     *
3287     * @param { Uint8Array } src - A Uint8Array value
3288     * @returns { Uint8Array } Return the encoded new Uint8Array.
3289     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3290     * 1.Mandatory parameters are left unspecified;
3291     * 2.Incorrect parameter types.
3292     * @syscap SystemCapability.Utils.Lang
3293     * @crossplatform
3294     * @since 10
3295     */
3296    /**
3297     * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3298     *
3299     * @param { Uint8Array } src - A Uint8Array value
3300     * @returns { Uint8Array } Return the encoded new Uint8Array.
3301     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3302     * 1.Mandatory parameters are left unspecified;
3303     * 2.Incorrect parameter types.
3304     * @syscap SystemCapability.Utils.Lang
3305     * @crossplatform
3306     * @atomicservice
3307     * @since 11
3308     */
3309    /**
3310     * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3311     *
3312     * @param { Uint8Array } src - A Uint8Array value
3313     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and BASIC_URL_SAFE
3314     * @returns { Uint8Array } Return the encoded new Uint8Array.
3315     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3316     * 1.Mandatory parameters are left unspecified;
3317     * 2.Incorrect parameter types.
3318     * @syscap SystemCapability.Utils.Lang
3319     * @crossplatform
3320     * @atomicservice
3321     * @since 12
3322     */
3323    encodeSync(src: Uint8Array, options?: Type): Uint8Array;
3324
3325    /**
3326     * Encodes the specified byte array into a String using the Base64 encoding scheme.
3327     *
3328     * @param { Uint8Array } src - A Uint8Array value
3329     * @returns { string } Return the encoded string.
3330     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3331     * 1.Mandatory parameters are left unspecified;
3332     * 2.Incorrect parameter types.
3333     * @syscap SystemCapability.Utils.Lang
3334     * @since 9
3335     */
3336    /**
3337     * Encodes the specified byte array into a String using the Base64 encoding scheme.
3338     *
3339     * @param { Uint8Array } src - A Uint8Array value
3340     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
3341     * @returns { string } Return the encoded string.
3342     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3343     * 1.Mandatory parameters are left unspecified;
3344     * 2.Incorrect parameter types.
3345     * @syscap SystemCapability.Utils.Lang
3346     * @crossplatform
3347     * @since 10
3348     */
3349    /**
3350     * Encodes the specified byte array into a String using the Base64 encoding scheme.
3351     *
3352     * @param { Uint8Array } src - A Uint8Array value
3353     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
3354     * @returns { string } Return the encoded string.
3355     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3356     * 1.Mandatory parameters are left unspecified;
3357     * 2.Incorrect parameter types.
3358     * @syscap SystemCapability.Utils.Lang
3359     * @crossplatform
3360     * @atomicservice
3361     * @since 11
3362     */
3363    /**
3364     * Encodes the specified byte array into a String using the Base64 encoding scheme.
3365     *
3366     * @param { Uint8Array } src - A Uint8Array value
3367     * @param { Type } options - one of the Type enumeration
3368     * @returns { string } Return the encoded string.
3369     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3370     * 1.Mandatory parameters are left unspecified;
3371     * 2.Incorrect parameter types.
3372     * @syscap SystemCapability.Utils.Lang
3373     * @crossplatform
3374     * @atomicservice
3375     * @since 12
3376     */
3377    encodeToStringSync(src: Uint8Array, options?: Type): string;
3378
3379    /**
3380     * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3381     *
3382     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3383     * @returns { Uint8Array } Return the decoded Uint8Array.
3384     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3385     * 1.Mandatory parameters are left unspecified;
3386     * 2.Incorrect parameter types.
3387     * @syscap SystemCapability.Utils.Lang
3388     * @since 9
3389     */
3390    /**
3391     * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3392     *
3393     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3394     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
3395     * @returns { Uint8Array } Return the decoded Uint8Array.
3396     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3397     * 1.Mandatory parameters are left unspecified;
3398     * 2.Incorrect parameter types.
3399     * @syscap SystemCapability.Utils.Lang
3400     * @crossplatform
3401     * @since 10
3402     */
3403    /**
3404     * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3405     *
3406     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3407     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
3408     * @returns { Uint8Array } Return the decoded Uint8Array.
3409     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3410     * 1.Mandatory parameters are left unspecified;
3411     * 2.Incorrect parameter types.
3412     * @syscap SystemCapability.Utils.Lang
3413     * @crossplatform
3414     * @atomicservice
3415     * @since 11
3416     */
3417    /**
3418     * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
3419     *
3420     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3421     * @param { Type } [options] - one of the Type enumeration
3422     * @returns { Uint8Array } Return the decoded Uint8Array.
3423     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3424     * 1.Mandatory parameters are left unspecified;
3425     * 2.Incorrect parameter types.
3426     * @syscap SystemCapability.Utils.Lang
3427     * @crossplatform
3428     * @atomicservice
3429     * @since 12
3430     */
3431    decodeSync(src: Uint8Array | string, options?: Type): Uint8Array;
3432
3433    /**
3434     * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme.
3435     *
3436     * @param { Uint8Array } src - A Uint8Array value
3437     * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array.
3438     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3439     * 1.Mandatory parameters are left unspecified;
3440     * 2.Incorrect parameter types.
3441     * @syscap SystemCapability.Utils.Lang
3442     * @since 9
3443     */
3444    /**
3445     * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme.
3446     *
3447     * @param { Uint8Array } src - A Uint8Array value
3448     * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array.
3449     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3450     * 1.Mandatory parameters are left unspecified;
3451     * 2.Incorrect parameter types.
3452     * @syscap SystemCapability.Utils.Lang
3453     * @crossplatform
3454     * @since 10
3455     */
3456    /**
3457     * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme.
3458     *
3459     * @param { Uint8Array } src - A Uint8Array value
3460     * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array.
3461     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3462     * 1.Mandatory parameters are left unspecified;
3463     * 2.Incorrect parameter types.
3464     * @syscap SystemCapability.Utils.Lang
3465     * @crossplatform
3466     * @atomicservice
3467     * @since 11
3468     */
3469    /**
3470     * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme.
3471     *
3472     * @param { Uint8Array } src - A Uint8Array value
3473     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and BASIC_URL_SAFE
3474     * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array.
3475     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3476     * 1.Mandatory parameters are left unspecified;
3477     * 2.Incorrect parameter types.
3478     * @syscap SystemCapability.Utils.Lang
3479     * @crossplatform
3480     * @atomicservice
3481     * @since 12
3482     */
3483    encode(src: Uint8Array, options?: Type): Promise<Uint8Array>;
3484
3485    /**
3486     * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme.
3487     *
3488     * @param { Uint8Array } src - A Uint8Array value
3489     * @returns { Promise<string> } Returns the encoded asynchronous string.
3490     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3491     * 1.Mandatory parameters are left unspecified;
3492     * 2.Incorrect parameter types.
3493     * @syscap SystemCapability.Utils.Lang
3494     * @since 9
3495     */
3496    /**
3497     * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme.
3498     *
3499     * @param { Uint8Array } src - A Uint8Array value
3500     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
3501     * @returns { Promise<string> } Returns the encoded asynchronous string.
3502     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3503     * 1.Mandatory parameters are left unspecified;
3504     * 2.Incorrect parameter types.
3505     * @syscap SystemCapability.Utils.Lang
3506     * @crossplatform
3507     * @since 10
3508     */
3509    /**
3510     * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme.
3511     *
3512     * @param { Uint8Array } src - A Uint8Array value
3513     * @param { Type } [options] - one of the Type enumeration
3514     * @returns { Promise<string> } Returns the encoded asynchronous string.
3515     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3516     * 1.Mandatory parameters are left unspecified;
3517     * 2.Incorrect parameter types.
3518     * @syscap SystemCapability.Utils.Lang
3519     * @crossplatform
3520     * @atomicservice
3521     * @since 12
3522     */
3523    encodeToString(src: Uint8Array, options?: Type): Promise<string>;
3524
3525    /**
3526     * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or
3527     * input u8 array into a newly allocated u8 array.
3528     *
3529     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3530     * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array.
3531     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3532     * 1.Mandatory parameters are left unspecified;
3533     * 2.Incorrect parameter types.
3534     * @syscap SystemCapability.Utils.Lang
3535     * @since 9
3536     */
3537    /**
3538     * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or
3539     * input u8 array into a newly allocated u8 array.
3540     *
3541     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3542     * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
3543     * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array.
3544     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3545     * 1.Mandatory parameters are left unspecified;
3546     * 2.Incorrect parameter types.
3547     * @syscap SystemCapability.Utils.Lang
3548     * @crossplatform
3549     * @since 10
3550     */
3551    /**
3552     * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or
3553     * input u8 array into a newly allocated u8 array.
3554     *
3555     * @param { Uint8Array | string } src - A Uint8Array value or value A string value
3556     * @param { Type } [options] - one of the Type enumeration
3557     * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array.
3558     * @throws { BusinessError } 401 - Parameter error. Possible causes:
3559     * 1.Mandatory parameters are left unspecified;
3560     * 2.Incorrect parameter types.
3561     * @syscap SystemCapability.Utils.Lang
3562     * @crossplatform
3563     * @atomicservice
3564     * @since 12
3565     */
3566    decode(src: Uint8Array | string, options?: Type): Promise<Uint8Array>;
3567  }
3568
3569  /**
3570   * Check the type of parameter.
3571   *
3572   * @syscap SystemCapability.Utils.Lang
3573   * @since 8
3574   */
3575  /**
3576   * Check the type of parameter.
3577   *
3578   * @syscap SystemCapability.Utils.Lang
3579   * @crossplatform
3580   * @since 10
3581   */
3582  /**
3583   * Check the type of parameter.
3584   *
3585   * @syscap SystemCapability.Utils.Lang
3586   * @crossplatform
3587   * @atomicservice
3588   * @since 12
3589   */
3590  class types {
3591    /**
3592     * The types constructor
3593     *
3594     * @syscap SystemCapability.Utils.Lang
3595     * @since 8
3596     */
3597    /**
3598     * The types constructor
3599     *
3600     * @syscap SystemCapability.Utils.Lang
3601     * @crossplatform
3602     * @since 10
3603     */
3604    /**
3605     * The types constructor
3606     *
3607     * @syscap SystemCapability.Utils.Lang
3608     * @crossplatform
3609     * @atomicservice
3610     * @since 12
3611     */
3612    constructor();
3613    /**
3614     * Check whether the entered value is of arraybuffer or sharedarraybuffer type.
3615     *
3616     * @param { Object } value - A ArrayBuffer or SharedArrayBuffer value
3617     * @returns { boolean } Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance.
3618     * @syscap SystemCapability.Utils.Lang
3619     * @since 8
3620     */
3621    /**
3622     * Check whether the entered value is of arraybuffer or sharedarraybuffer type.
3623     *
3624     * @param { Object } value - A ArrayBuffer or SharedArrayBuffer value
3625     * @returns { boolean } Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance.
3626     * @syscap SystemCapability.Utils.Lang
3627     * @crossplatform
3628     * @since 10
3629     */
3630    /**
3631     * Check whether the entered value is of arraybuffer or sharedarraybuffer type.
3632     *
3633     * @param { Object } value - A ArrayBuffer or SharedArrayBuffer value
3634     * @returns { boolean } Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance.
3635     * @syscap SystemCapability.Utils.Lang
3636     * @crossplatform
3637     * @atomicservice
3638     * @since 12
3639     */
3640    isAnyArrayBuffer(value: Object): boolean;
3641    /**
3642     * Check whether the type is included in the isAnyArrayBuffer.
3643     *
3644     * @param { Object } value - A included in the isAnyArrayBuffer value
3645     * @returns { boolean } Returns true if the value is an instance of one of the ArrayBuffer views,
3646     * such as typed array objects or DataView.
3647     * @syscap SystemCapability.Utils.Lang
3648     * @since 8
3649     */
3650    /**
3651     * Check whether the type is included in the isAnyArrayBuffer.
3652     *
3653     * @param { Object } value - A included in the isAnyArrayBuffer value
3654     * @returns { boolean } Returns true if the value is an instance of one of the ArrayBuffer views,
3655     * such as typed array objects or DataView.
3656     * @syscap SystemCapability.Utils.Lang
3657     * @crossplatform
3658     * @since 10
3659     */
3660    /**
3661     * Check whether the type is included in the isAnyArrayBuffer.
3662     *
3663     * @param { Object } value - A included in the isAnyArrayBuffer value
3664     * @returns { boolean } Returns true if the value is an instance of one of the ArrayBuffer views,
3665     * such as typed array objects or DataView.
3666     * @syscap SystemCapability.Utils.Lang
3667     * @crossplatform
3668     * @atomicservice
3669     * @since 12
3670     */
3671    isArrayBufferView(value: Object): boolean;
3672    /**
3673     * Check whether the entered value is an arguments object type.
3674     *
3675     * @param { Object } value - A arguments value
3676     * @returns { boolean } Returns true if the value is an arguments object.
3677     * @syscap SystemCapability.Utils.Lang
3678     * @since 8
3679     */
3680    /**
3681     * Check whether the entered value is an arguments object type.
3682     *
3683     * @param { Object } value - A arguments value
3684     * @returns { boolean } Returns true if the value is an arguments object.
3685     * @syscap SystemCapability.Utils.Lang
3686     * @crossplatform
3687     * @since 10
3688     */
3689    /**
3690     * Check whether the entered value is an arguments object type.
3691     *
3692     * @param { Object } value - A arguments value
3693     * @returns { boolean } Returns true if the value is an arguments object.
3694     * @syscap SystemCapability.Utils.Lang
3695     * @crossplatform
3696     * @atomicservice
3697     * @since 12
3698     */
3699    isArgumentsObject(value: Object): boolean;
3700    /**
3701     * Check whether the entered value is of arraybuffer type.
3702     *
3703     * @param { Object } value - A arraybuffer value
3704     * @returns { boolean } Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances.
3705     * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that.
3706     * @syscap SystemCapability.Utils.Lang
3707     * @since 8
3708     */
3709    /**
3710     * Check whether the entered value is of arraybuffer type.
3711     *
3712     * @param { Object } value - A arraybuffer value
3713     * @returns { boolean } Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances.
3714     * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that.
3715     * @syscap SystemCapability.Utils.Lang
3716     * @crossplatform
3717     * @since 10
3718     */
3719    /**
3720     * Check whether the entered value is of arraybuffer type.
3721     *
3722     * @param { Object } value - A arraybuffer value
3723     * @returns { boolean } Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances.
3724     * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that.
3725     * @syscap SystemCapability.Utils.Lang
3726     * @crossplatform
3727     * @atomicservice
3728     * @since 12
3729     */
3730    isArrayBuffer(value: Object): boolean;
3731    /**
3732     * Check whether the value entered is an asynchronous function type.
3733     *
3734     * @param { Object } value - A async function value
3735     * @returns { boolean } Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing;
3736     * in particular, the return value may not match the original source code if a transpilation tool was used.
3737     * @syscap SystemCapability.Utils.Lang
3738     * @since 8
3739     */
3740    /**
3741     * Check whether the value entered is an asynchronous function type.
3742     *
3743     * @param { Object } value - A async function value
3744     * @returns { boolean } Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing;
3745     * in particular, the return value may not match the original source code if a transpilation tool was used.
3746     * @syscap SystemCapability.Utils.Lang
3747     * @crossplatform
3748     * @since 10
3749     */
3750    /**
3751     * Check whether the value entered is an asynchronous function type.
3752     *
3753     * @param { Object } value - A async function value
3754     * @returns { boolean } Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing;
3755     * in particular, the return value may not match the original source code if a transpilation tool was used.
3756     * @syscap SystemCapability.Utils.Lang
3757     * @crossplatform
3758     * @atomicservice
3759     * @since 12
3760     */
3761    isAsyncFunction(value: Object): boolean;
3762    /**
3763     * Check whether the entered value is of bigint64array array type.
3764     *
3765     * @param { Object } value - A BigInt64Array value
3766     * @returns { boolean } Returns true if the value is a BigInt64Array instance.
3767     * @syscap SystemCapability.Utils.Lang
3768     * @since 8
3769     */
3770    /**
3771     * Check whether the entered value is of bigint64array array type.
3772     *
3773     * @param { Object } value - A BigInt64Array value
3774     * @returns { boolean } Returns true if the value is a BigInt64Array instance.
3775     * @syscap SystemCapability.Utils.Lang
3776     * @crossplatform
3777     * @since 10
3778     */
3779    /**
3780     * Check whether the entered value is of bigint64array array type.
3781     *
3782     * @param { Object } value - A BigInt64Array value
3783     * @returns { boolean } Returns true if the value is a BigInt64Array instance.
3784     * @syscap SystemCapability.Utils.Lang
3785     * @crossplatform
3786     * @atomicservice
3787     * @since 12
3788     */
3789    isBigInt64Array(value: Object): boolean;
3790    /**
3791     * Check whether the entered value is of biguint64array array array type.
3792     *
3793     * @param { Object } value - A BigUint64Array value
3794     * @returns { boolean } Returns true if the value is a BigUint64Array instance.
3795     * @syscap SystemCapability.Utils.Lang
3796     * @since 8
3797     */
3798    /**
3799     * Check whether the entered value is of biguint64array array array type.
3800     *
3801     * @param { Object } value - A BigUint64Array value
3802     * @returns { boolean } Returns true if the value is a BigUint64Array instance.
3803     * @syscap SystemCapability.Utils.Lang
3804     * @crossplatform
3805     * @since 10
3806     */
3807    /**
3808     * Check whether the entered value is of biguint64array array array type.
3809     *
3810     * @param { Object } value - A BigUint64Array value
3811     * @returns { boolean } Returns true if the value is a BigUint64Array instance.
3812     * @syscap SystemCapability.Utils.Lang
3813     * @crossplatform
3814     * @atomicservice
3815     * @since 12
3816     */
3817    isBigUint64Array(value: Object): boolean;
3818    /**
3819     * Check whether the entered value is a Boolean object type.
3820     *
3821     * @param { Object } value - A boolean object value
3822     * @returns { boolean } Returns true if the value is a boolean object, e.g. created by new Boolean().
3823     * @syscap SystemCapability.Utils.Lang
3824     * @since 8
3825     */
3826    /**
3827     * Check whether the entered value is a Boolean object type.
3828     *
3829     * @param { Object } value - A boolean object value
3830     * @returns { boolean } Returns true if the value is a boolean object, e.g. created by new Boolean().
3831     * @syscap SystemCapability.Utils.Lang
3832     * @crossplatform
3833     * @since 10
3834     */
3835    /**
3836     * Check whether the entered value is a Boolean object type.
3837     *
3838     * @param { Object } value - A boolean object value
3839     * @returns { boolean } Returns true if the value is a boolean object, e.g. created by new Boolean().
3840     * @syscap SystemCapability.Utils.Lang
3841     * @crossplatform
3842     * @atomicservice
3843     * @since 12
3844     */
3845    isBooleanObject(value: Object): boolean;
3846    /**
3847     * Check whether the entered value is a Boolean or number or string or symbol object type.
3848     *
3849     * @param { Object } value - A boxed primitive object value
3850     * @returns { boolean } Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()).
3851     * @syscap SystemCapability.Utils.Lang
3852     * @since 8
3853     */
3854    /**
3855     * Check whether the entered value is a Boolean or number or string or symbol object type.
3856     *
3857     * @param { Object } value - A boxed primitive object value
3858     * @returns { boolean } Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()).
3859     * @syscap SystemCapability.Utils.Lang
3860     * @crossplatform
3861     * @since 10
3862     */
3863    /**
3864     * Check whether the entered value is a Boolean or number or string or symbol object type.
3865     *
3866     * @param { Object } value - A boxed primitive object value
3867     * @returns { boolean } Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()).
3868     * @syscap SystemCapability.Utils.Lang
3869     * @crossplatform
3870     * @atomicservice
3871     * @since 12
3872     */
3873    isBoxedPrimitive(value: Object): boolean;
3874    /**
3875     * Check whether the entered value is of DataView type.
3876     *
3877     * @param { Object } value - A DataView value
3878     * @returns { boolean } Returns true if the value is a built-in DataView instance.
3879     * @syscap SystemCapability.Utils.Lang
3880     * @since 8
3881     */
3882    /**
3883     * Check whether the entered value is of DataView type.
3884     *
3885     * @param { Object } value - A DataView value
3886     * @returns { boolean } Returns true if the value is a built-in DataView instance.
3887     * @syscap SystemCapability.Utils.Lang
3888     * @crossplatform
3889     * @since 10
3890     */
3891    /**
3892     * Check whether the entered value is of DataView type.
3893     *
3894     * @param { Object } value - A DataView value
3895     * @returns { boolean } Returns true if the value is a built-in DataView instance.
3896     * @syscap SystemCapability.Utils.Lang
3897     * @crossplatform
3898     * @atomicservice
3899     * @since 12
3900     */
3901    isDataView(value: Object): boolean;
3902    /**
3903     * Check whether the entered value is of type date.
3904     *
3905     * @param { Object } value - A Date value
3906     * @returns { boolean } Returns true if the value is a built-in Date instance.
3907     * @syscap SystemCapability.Utils.Lang
3908     * @since 8
3909     */
3910    /**
3911     * Check whether the entered value is of type date.
3912     *
3913     * @param { Object } value - A Date value
3914     * @returns { boolean } Returns true if the value is a built-in Date instance.
3915     * @syscap SystemCapability.Utils.Lang
3916     * @crossplatform
3917     * @since 10
3918     */
3919    /**
3920     * Check whether the entered value is of type date.
3921     *
3922     * @param { Object } value - A Date value
3923     * @returns { boolean } Returns true if the value is a built-in Date instance.
3924     * @syscap SystemCapability.Utils.Lang
3925     * @crossplatform
3926     * @atomicservice
3927     * @since 12
3928     */
3929    isDate(value: Object): boolean;
3930    /**
3931     * Check whether the entered value is a native external value type.
3932     *
3933     * @param { Object } value - A External value
3934     * @returns { boolean } Returns true if the value is a native External value.
3935     * @syscap SystemCapability.Utils.Lang
3936     * @since 8
3937     */
3938    /**
3939     * Check whether the entered value is a native external value type.
3940     *
3941     * @param { Object } value - A External value
3942     * @returns { boolean } Returns true if the value is a native External value.
3943     * @syscap SystemCapability.Utils.Lang
3944     * @crossplatform
3945     * @since 10
3946     */
3947    /**
3948     * Check whether the entered value is a native external value type.
3949     *
3950     * @param { Object } value - A External value
3951     * @returns { boolean } Returns true if the value is a native External value.
3952     * @syscap SystemCapability.Utils.Lang
3953     * @crossplatform
3954     * @atomicservice
3955     * @since 12
3956     */
3957    isExternal(value: Object): boolean;
3958    /**
3959     * Check whether the entered value is of float32array array type.
3960     *
3961     * @param { Object } value - A Float32Array value
3962     * @returns { boolean } Returns true if the value is a built-in Float32Array instance.
3963     * @syscap SystemCapability.Utils.Lang
3964     * @since 8
3965     */
3966    /**
3967     * Check whether the entered value is of float32array array type.
3968     *
3969     * @param { Object } value - A Float32Array value
3970     * @returns { boolean } Returns true if the value is a built-in Float32Array instance.
3971     * @syscap SystemCapability.Utils.Lang
3972     * @crossplatform
3973     * @since 10
3974     */
3975    /**
3976     * Check whether the entered value is of float32array array type.
3977     *
3978     * @param { Object } value - A Float32Array value
3979     * @returns { boolean } Returns true if the value is a built-in Float32Array instance.
3980     * @syscap SystemCapability.Utils.Lang
3981     * @crossplatform
3982     * @atomicservice
3983     * @since 12
3984     */
3985    isFloat32Array(value: Object): boolean;
3986    /**
3987     * Check whether the entered value is of float64array array type.
3988     *
3989     * @param { Object } value - A Float64Array value
3990     * @returns { boolean } Returns true if the value is a built-in Float64Array instance.
3991     * @syscap SystemCapability.Utils.Lang
3992     * @since 8
3993     */
3994    /**
3995     * Check whether the entered value is of float64array array type.
3996     *
3997     * @param { Object } value - A Float64Array value
3998     * @returns { boolean } Returns true if the value is a built-in Float64Array instance.
3999     * @syscap SystemCapability.Utils.Lang
4000     * @crossplatform
4001     * @since 10
4002     */
4003    /**
4004     * Check whether the entered value is of float64array array type.
4005     *
4006     * @param { Object } value - A Float64Array value
4007     * @returns { boolean } Returns true if the value is a built-in Float64Array instance.
4008     * @syscap SystemCapability.Utils.Lang
4009     * @crossplatform
4010     * @atomicservice
4011     * @since 12
4012     */
4013    isFloat64Array(value: Object): boolean;
4014    /**
4015     * Check whether the input value is a generator function type.
4016     *
4017     * @param { Object } value - A generator function value
4018     * @returns { boolean } Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular,
4019     * the return value may not match the original source code if a transpilation tool was used.
4020     * @syscap SystemCapability.Utils.Lang
4021     * @since 8
4022     */
4023    /**
4024     * Check whether the input value is a generator function type.
4025     *
4026     * @param { Object } value - A generator function value
4027     * @returns { boolean } Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular,
4028     * the return value may not match the original source code if a transpilation tool was used.
4029     * @syscap SystemCapability.Utils.Lang
4030     * @crossplatform
4031     * @since 10
4032     */
4033    /**
4034     * Check whether the input value is a generator function type.
4035     *
4036     * @param { Object } value - A generator function value
4037     * @returns { boolean } Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular,
4038     * the return value may not match the original source code if a transpilation tool was used.
4039     * @syscap SystemCapability.Utils.Lang
4040     * @crossplatform
4041     * @atomicservice
4042     * @since 12
4043     */
4044    isGeneratorFunction(value: Object): boolean;
4045    /**
4046     * Check whether the entered value is a generator object type.
4047     *
4048     * @param { Object } value - A generator object value
4049     * @returns { boolean } Returns true if the value is a generator object as returned from a built-in generator function.
4050     * This only reports back what the JavaScript engine is seeing; in particular,
4051     *the return value may not match the original source code if a transpilation tool was used.
4052     * @syscap SystemCapability.Utils.Lang
4053     * @since 8
4054     */
4055    /**
4056     * Check whether the entered value is a generator object type.
4057     *
4058     * @param { Object } value - A generator object value
4059     * @returns { boolean } Returns true if the value is a generator object as returned from a built-in generator function.
4060     * This only reports back what the JavaScript engine is seeing; in particular,
4061     *the return value may not match the original source code if a transpilation tool was used.
4062     * @syscap SystemCapability.Utils.Lang
4063     * @crossplatform
4064     * @since 10
4065     */
4066    /**
4067     * Check whether the entered value is a generator object type.
4068     *
4069     * @param { Object } value - A generator object value
4070     * @returns { boolean } Returns true if the value is a generator object as returned from a built-in generator function.
4071     * This only reports back what the JavaScript engine is seeing; in particular,
4072     *the return value may not match the original source code if a transpilation tool was used.
4073     * @syscap SystemCapability.Utils.Lang
4074     * @crossplatform
4075     * @atomicservice
4076     * @since 12
4077     */
4078    isGeneratorObject(value: Object): boolean;
4079    /**
4080     * Check whether the entered value is of int8array array type.
4081     *
4082     * @param { Object } value - A Int8Array value
4083     * @returns { boolean } Returns true if the value is a built-in Int8Array instance.
4084     * @syscap SystemCapability.Utils.Lang
4085     * @since 8
4086     */
4087    /**
4088     * Check whether the entered value is of int8array array type.
4089     *
4090     * @param { Object } value - A Int8Array value
4091     * @returns { boolean } Returns true if the value is a built-in Int8Array instance.
4092     * @syscap SystemCapability.Utils.Lang
4093     * @crossplatform
4094     * @since 10
4095     */
4096    /**
4097     * Check whether the entered value is of int8array array type.
4098     *
4099     * @param { Object } value - A Int8Array value
4100     * @returns { boolean } Returns true if the value is a built-in Int8Array instance.
4101     * @syscap SystemCapability.Utils.Lang
4102     * @crossplatform
4103     * @atomicservice
4104     * @since 12
4105     */
4106    isInt8Array(value: Object): boolean;
4107    /**
4108     * Check whether the entered value is the int16array type.
4109     *
4110     * @param { Object } value - A Int16Array value
4111     * @returns { boolean } Returns true if the value is a built-in Int16Array instance.
4112     * @syscap SystemCapability.Utils.Lang
4113     * @since 8
4114     */
4115    /**
4116     * Check whether the entered value is the int16array type.
4117     *
4118     * @param { Object } value - A Int16Array value
4119     * @returns { boolean } Returns true if the value is a built-in Int16Array instance.
4120     * @syscap SystemCapability.Utils.Lang
4121     * @crossplatform
4122     * @since 10
4123     */
4124    /**
4125     * Check whether the entered value is the int16array type.
4126     *
4127     * @param { Object } value - A Int16Array value
4128     * @returns { boolean } Returns true if the value is a built-in Int16Array instance.
4129     * @syscap SystemCapability.Utils.Lang
4130     * @crossplatform
4131     * @atomicservice
4132     * @since 12
4133     */
4134    isInt16Array(value: Object): boolean;
4135    /**
4136     * Check whether the entered value is the int32array array type.
4137     *
4138     * @param { Object } value - A Int32Array value
4139     * @returns { boolean } Returns true if the value is a built-in Int32Array instance.
4140     * @syscap SystemCapability.Utils.Lang
4141     * @since 8
4142     */
4143    /**
4144     * Check whether the entered value is the int32array array type.
4145     *
4146     * @param { Object } value - A Int32Array value
4147     * @returns { boolean } Returns true if the value is a built-in Int32Array instance.
4148     * @syscap SystemCapability.Utils.Lang
4149     * @crossplatform
4150     * @since 10
4151     */
4152    /**
4153     * Check whether the entered value is the int32array array type.
4154     *
4155     * @param { Object } value - A Int32Array value
4156     * @returns { boolean } Returns true if the value is a built-in Int32Array instance.
4157     * @syscap SystemCapability.Utils.Lang
4158     * @crossplatform
4159     * @atomicservice
4160     * @since 12
4161     */
4162    isInt32Array(value: Object): boolean;
4163    /**
4164     * Check whether the entered value is of map type.
4165     *
4166     * @param { Object } value - A Map value
4167     * @returns { boolean } Returns true if the value is a built-in Map instance.
4168     * @syscap SystemCapability.Utils.Lang
4169     * @since 8
4170     */
4171    /**
4172     * Check whether the entered value is of map type.
4173     *
4174     * @param { Object } value - A Map value
4175     * @returns { boolean } Returns true if the value is a built-in Map instance.
4176     * @syscap SystemCapability.Utils.Lang
4177     * @crossplatform
4178     * @since 10
4179     */
4180    /**
4181     * Check whether the entered value is of map type.
4182     *
4183     * @param { Object } value - A Map value
4184     * @returns { boolean } Returns true if the value is a built-in Map instance.
4185     * @syscap SystemCapability.Utils.Lang
4186     * @crossplatform
4187     * @atomicservice
4188     * @since 12
4189     */
4190    isMap(value: Object): boolean;
4191    /**
4192     * Check whether the entered value is the iterator type of map.
4193     *
4194     * @param { Object } value - A Map iterator value
4195     * @returns { boolean } Returns true if the value is an iterator returned for a built-in Map instance.
4196     * @syscap SystemCapability.Utils.Lang
4197     * @since 8
4198     */
4199    /**
4200     * Check whether the entered value is the iterator type of map.
4201     *
4202     * @param { Object } value - A Map iterator value
4203     * @returns { boolean } Returns true if the value is an iterator returned for a built-in Map instance.
4204     * @syscap SystemCapability.Utils.Lang
4205     * @crossplatform
4206     * @since 10
4207     */
4208    /**
4209     * Check whether the entered value is the iterator type of map.
4210     *
4211     * @param { Object } value - A Map iterator value
4212     * @returns { boolean } Returns true if the value is an iterator returned for a built-in Map instance.
4213     * @syscap SystemCapability.Utils.Lang
4214     * @crossplatform
4215     * @atomicservice
4216     * @since 12
4217     */
4218    isMapIterator(value: Object): boolean;
4219    /**
4220     * Check whether the entered value is the module namespace object object type.
4221     *
4222     * @param { Object } value - A Module Namespace Object value
4223     * @returns { boolean } Returns true if the value is an instance of a Module Namespace Object.
4224     * @syscap SystemCapability.Utils.Lang
4225     * @since 8
4226     */
4227    /**
4228     * Check whether the entered value is the module namespace object object type.
4229     *
4230     * @param { Object } value - A Module Namespace Object value
4231     * @returns { boolean } Returns true if the value is an instance of a Module Namespace Object.
4232     * @syscap SystemCapability.Utils.Lang
4233     * @crossplatform
4234     * @since 10
4235     */
4236    /**
4237     * Check whether the entered value is the module namespace object object type.
4238     *
4239     * @param { Object } value - A Module Namespace Object value
4240     * @returns { boolean } Returns true if the value is an instance of a Module Namespace Object.
4241     * @syscap SystemCapability.Utils.Lang
4242     * @crossplatform
4243     * @atomicservice
4244     * @since 12
4245     */
4246    isModuleNamespaceObject(value: Object): boolean;
4247    /**
4248     * Check whether the value entered is of type error.
4249     *
4250     * @param { Object } value - A Error value
4251     * @returns { boolean } Returns true if the value is an instance of a built-in Error type.
4252     * @syscap SystemCapability.Utils.Lang
4253     * @since 8
4254     */
4255    /**
4256     * Check whether the value entered is of type error.
4257     *
4258     * @param { Object } value - A Error value
4259     * @returns { boolean } Returns true if the value is an instance of a built-in Error type.
4260     * @syscap SystemCapability.Utils.Lang
4261     * @crossplatform
4262     * @since 10
4263     */
4264    /**
4265     * Check whether the value entered is of type error.
4266     *
4267     * @param { Object } value - A Error value
4268     * @returns { boolean } Returns true if the value is an instance of a built-in Error type.
4269     * @syscap SystemCapability.Utils.Lang
4270     * @crossplatform
4271     * @atomicservice
4272     * @since 12
4273     */
4274    isNativeError(value: Object): boolean;
4275    /**
4276     * Check whether the entered value is of the number object type.
4277     *
4278     * @param { Object } value - A number object value
4279     * @returns { boolean } Returns true if the value is a number object, e.g. created by new Number().
4280     * @syscap SystemCapability.Utils.Lang
4281     * @since 8
4282     */
4283    /**
4284     * Check whether the entered value is of the number object type.
4285     *
4286     * @param { Object } value - A number object value
4287     * @returns { boolean } Returns true if the value is a number object, e.g. created by new Number().
4288     * @syscap SystemCapability.Utils.Lang
4289     * @crossplatform
4290     * @since 10
4291     */
4292    /**
4293     * Check whether the entered value is of the number object type.
4294     *
4295     * @param { Object } value - A number object value
4296     * @returns { boolean } Returns true if the value is a number object, e.g. created by new Number().
4297     * @syscap SystemCapability.Utils.Lang
4298     * @crossplatform
4299     * @atomicservice
4300     * @since 12
4301     */
4302    isNumberObject(value: Object): boolean;
4303    /**
4304     * Check whether the entered value is of promise type.
4305     *
4306     * @param { Object } value - A Promise value
4307     * @returns { boolean } Returns true if the value is a built-in Promise.
4308     * @syscap SystemCapability.Utils.Lang
4309     * @since 8
4310     */
4311    /**
4312     * Check whether the entered value is of promise type.
4313     *
4314     * @param { Object } value - A Promise value
4315     * @returns { boolean } Returns true if the value is a built-in Promise.
4316     * @syscap SystemCapability.Utils.Lang
4317     * @crossplatform
4318     * @since 10
4319     */
4320    /**
4321     * Check whether the entered value is of promise type.
4322     *
4323     * @param { Object } value - A Promise value
4324     * @returns { boolean } Returns true if the value is a built-in Promise.
4325     * @syscap SystemCapability.Utils.Lang
4326     * @crossplatform
4327     * @atomicservice
4328     * @since 12
4329     */
4330    isPromise(value: Object): boolean;
4331    /**
4332     * Check whether the value entered is of proxy type.
4333     *
4334     * @param { Object } value - A Proxy value
4335     * @returns { boolean } Returns true if the value is a Proxy instance.
4336     * @syscap SystemCapability.Utils.Lang
4337     * @since 8
4338     */
4339    /**
4340     * Check whether the value entered is of proxy type.
4341     *
4342     * @param { Object } value - A Proxy value
4343     * @returns { boolean } Returns true if the value is a Proxy instance.
4344     * @syscap SystemCapability.Utils.Lang
4345     * @crossplatform
4346     * @since 10
4347     */
4348    /**
4349     * Check whether the value entered is of proxy type.
4350     *
4351     * @param { Object } value - A Proxy value
4352     * @returns { boolean } Returns true if the value is a Proxy instance.
4353     * @syscap SystemCapability.Utils.Lang
4354     * @crossplatform
4355     * @atomicservice
4356     * @since 12
4357     */
4358    isProxy(value: Object): boolean;
4359    /**
4360     * Check whether the entered value is of type regexp.
4361     *
4362     * @param { Object } value - A regular expression object value
4363     * @returns { boolean } Returns true if the value is a regular expression object.
4364     * @syscap SystemCapability.Utils.Lang
4365     * @since 8
4366     */
4367    /**
4368     * Check whether the entered value is of type regexp.
4369     *
4370     * @param { Object } value - A regular expression object value
4371     * @returns { boolean } Returns true if the value is a regular expression object.
4372     * @syscap SystemCapability.Utils.Lang
4373     * @crossplatform
4374     * @since 10
4375     */
4376    /**
4377     * Check whether the entered value is of type regexp.
4378     *
4379     * @param { Object } value - A regular expression object value
4380     * @returns { boolean } Returns true if the value is a regular expression object.
4381     * @syscap SystemCapability.Utils.Lang
4382     * @crossplatform
4383     * @atomicservice
4384     * @since 12
4385     */
4386    isRegExp(value: Object): boolean;
4387    /**
4388     * Check whether the entered value is of type set.
4389     *
4390     * @param { Object } value - A Set instance value
4391     * @returns { boolean } Returns true if the value is a built-in Set instance.
4392     * @syscap SystemCapability.Utils.Lang
4393     * @since 8
4394     */
4395    /**
4396     * Check whether the entered value is of type set.
4397     *
4398     * @param { Object } value - A Set instance value
4399     * @returns { boolean } Returns true if the value is a built-in Set instance.
4400     * @syscap SystemCapability.Utils.Lang
4401     * @crossplatform
4402     * @since 10
4403     */
4404    /**
4405     * Check whether the entered value is of type set.
4406     *
4407     * @param { Object } value - A Set instance value
4408     * @returns { boolean } Returns true if the value is a built-in Set instance.
4409     * @syscap SystemCapability.Utils.Lang
4410     * @crossplatform
4411     * @atomicservice
4412     * @since 12
4413     */
4414    isSet(value: Object): boolean;
4415    /**
4416     * Check whether the entered value is the iterator type of set.
4417     *
4418     * @param { Object } value - A Set iterator value
4419     * @returns { boolean } Returns true if the value is an iterator returned for a built-in Set instance.
4420     * @syscap SystemCapability.Utils.Lang
4421     * @since 8
4422     */
4423    /**
4424     * Check whether the entered value is the iterator type of set.
4425     *
4426     * @param { Object } value - A Set iterator value
4427     * @returns { boolean } Returns true if the value is an iterator returned for a built-in Set instance.
4428     * @syscap SystemCapability.Utils.Lang
4429     * @crossplatform
4430     * @since 10
4431     */
4432    /**
4433     * Check whether the entered value is the iterator type of set.
4434     *
4435     * @param { Object } value - A Set iterator value
4436     * @returns { boolean } Returns true if the value is an iterator returned for a built-in Set instance.
4437     * @syscap SystemCapability.Utils.Lang
4438     * @crossplatform
4439     * @atomicservice
4440     * @since 12
4441     */
4442    isSetIterator(value: Object): boolean;
4443    /**
4444     * Check whether the entered value is of type sharedarraybuffer.
4445     *
4446     * @param { Object } value - A SharedArrayBuffer instance value
4447     * @returns { boolean } Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances.
4448     * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that.
4449     * @syscap SystemCapability.Utils.Lang
4450     * @since 8
4451     */
4452    /**
4453     * Check whether the entered value is of type sharedarraybuffer.
4454     *
4455     * @param { Object } value - A SharedArrayBuffer instance value
4456     * @returns { boolean } Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances.
4457     * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that.
4458     * @syscap SystemCapability.Utils.Lang
4459     * @crossplatform
4460     * @since 10
4461     */
4462    /**
4463     * Check whether the entered value is of type sharedarraybuffer.
4464     *
4465     * @param { Object } value - A SharedArrayBuffer instance value
4466     * @returns { boolean } Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances.
4467     * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that.
4468     * @syscap SystemCapability.Utils.Lang
4469     * @crossplatform
4470     * @atomicservice
4471     * @since 12
4472     */
4473    isSharedArrayBuffer(value: Object): boolean;
4474    /**
4475     * Check whether the entered value is a string object type.
4476     *
4477     * @param { Object } value - A String object value
4478     * @returns { boolean } Returns true if the value is a string object, e.g. created by new String().
4479     * @syscap SystemCapability.Utils.Lang
4480     * @since 8
4481     */
4482    /**
4483     * Check whether the entered value is a string object type.
4484     *
4485     * @param { Object } value - A String object value
4486     * @returns { boolean } Returns true if the value is a string object, e.g. created by new String().
4487     * @syscap SystemCapability.Utils.Lang
4488     * @crossplatform
4489     * @since 10
4490     */
4491    /**
4492     * Check whether the entered value is a string object type.
4493     *
4494     * @param { Object } value - A String object value
4495     * @returns { boolean } Returns true if the value is a string object, e.g. created by new String().
4496     * @syscap SystemCapability.Utils.Lang
4497     * @crossplatform
4498     * @atomicservice
4499     * @since 12
4500     */
4501    isStringObject(value: Object): boolean;
4502    /**
4503     * Check whether the entered value is a symbol object type.
4504     *
4505     * @param { Object } value - A symbol object value
4506     * @returns { boolean } Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive.
4507     * @syscap SystemCapability.Utils.Lang
4508     * @since 8
4509     */
4510    /**
4511     * Check whether the entered value is a symbol object type.
4512     *
4513     * @param { Object } value - A symbol object value
4514     * @returns { boolean } Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive.
4515     * @syscap SystemCapability.Utils.Lang
4516     * @crossplatform
4517     * @since 10
4518     */
4519    /**
4520     * Check whether the entered value is a symbol object type.
4521     *
4522     * @param { Object } value - A symbol object value
4523     * @returns { boolean } Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive.
4524     * @syscap SystemCapability.Utils.Lang
4525     * @crossplatform
4526     * @atomicservice
4527     * @since 12
4528     */
4529    isSymbolObject(value: Object): boolean;
4530    /**
4531     * Check whether the entered value is a type contained in typedarray.
4532     *
4533     * @param { Object } value - A TypedArray instance value
4534     * @returns { boolean } Returns true if the value is a built-in TypedArray instance.
4535     * @syscap SystemCapability.Utils.Lang
4536     * @since 8
4537     */
4538    /**
4539     * Check whether the entered value is a type contained in typedarray.
4540     *
4541     * @param { Object } value - A TypedArray instance value
4542     * @returns { boolean } Returns true if the value is a built-in TypedArray instance.
4543     * @syscap SystemCapability.Utils.Lang
4544     * @crossplatform
4545     * @since 10
4546     */
4547    /**
4548     * Check whether the entered value is a type contained in typedarray.
4549     *
4550     * @param { Object } value - A TypedArray instance value
4551     * @returns { boolean } Returns true if the value is a built-in TypedArray instance.
4552     * @syscap SystemCapability.Utils.Lang
4553     * @crossplatform
4554     * @atomicservice
4555     * @since 12
4556     */
4557    isTypedArray(value: Object): boolean;
4558    /**
4559     * Check whether the entered value is the uint8array array type.
4560     *
4561     * @param { Object } value - A Uint8Array value
4562     * @returns { boolean } Returns true if the value is a built-in Uint8Array instance.
4563     * @syscap SystemCapability.Utils.Lang
4564     * @since 8
4565     */
4566    /**
4567     * Check whether the entered value is the uint8array array type.
4568     *
4569     * @param { Object } value - A Uint8Array value
4570     * @returns { boolean } Returns true if the value is a built-in Uint8Array instance.
4571     * @syscap SystemCapability.Utils.Lang
4572     * @crossplatform
4573     * @since 10
4574     */
4575    /**
4576     * Check whether the entered value is the uint8array array type.
4577     *
4578     * @param { Object } value - A Uint8Array value
4579     * @returns { boolean } Returns true if the value is a built-in Uint8Array instance.
4580     * @syscap SystemCapability.Utils.Lang
4581     * @crossplatform
4582     * @atomicservice
4583     * @since 12
4584     */
4585    isUint8Array(value: Object): boolean;
4586    /**
4587     * Check whether the entered value is the uint8clapedarray array type.
4588     *
4589     * @param { Object } value - A Uint8ClampedArray value
4590     * @returns { boolean } Returns true if the value is a built-in Uint8ClampedArray instance.
4591     * @syscap SystemCapability.Utils.Lang
4592     * @since 8
4593     */
4594    /**
4595     * Check whether the entered value is the uint8clapedarray array type.
4596     *
4597     * @param { Object } value - A Uint8ClampedArray value
4598     * @returns { boolean } Returns true if the value is a built-in Uint8ClampedArray instance.
4599     * @syscap SystemCapability.Utils.Lang
4600     * @crossplatform
4601     * @since 10
4602     */
4603    /**
4604     * Check whether the entered value is the uint8clapedarray array type.
4605     *
4606     * @param { Object } value - A Uint8ClampedArray value
4607     * @returns { boolean } Returns true if the value is a built-in Uint8ClampedArray instance.
4608     * @syscap SystemCapability.Utils.Lang
4609     * @crossplatform
4610     * @atomicservice
4611     * @since 12
4612     */
4613    isUint8ClampedArray(value: Object): boolean;
4614    /**
4615     * Check whether the entered value is the uint16array array array type.
4616     *
4617     * @param { Object } value - A Uint16Array value
4618     * @returns { boolean } Returns true if the value is a built-in Uint16Array instance.
4619     * @syscap SystemCapability.Utils.Lang
4620     * @since 8
4621     */
4622    /**
4623     * Check whether the entered value is the uint16array array array type.
4624     *
4625     * @param { Object } value - A Uint16Array value
4626     * @returns { boolean } Returns true if the value is a built-in Uint16Array instance.
4627     * @syscap SystemCapability.Utils.Lang
4628     * @crossplatform
4629     * @since 10
4630     */
4631    /**
4632     * Check whether the entered value is the uint16array array array type.
4633     *
4634     * @param { Object } value - A Uint16Array value
4635     * @returns { boolean } Returns true if the value is a built-in Uint16Array instance.
4636     * @syscap SystemCapability.Utils.Lang
4637     * @crossplatform
4638     * @atomicservice
4639     * @since 12
4640     */
4641    isUint16Array(value: Object): boolean;
4642    /**
4643     * Check whether the entered value is the uint32array array type.
4644     *
4645     * @param { Object } value - A Uint32Array value
4646     * @returns { boolean } Returns true if the value is a built-in Uint32Array instance.
4647     * @syscap SystemCapability.Utils.Lang
4648     * @since 8
4649     */
4650    /**
4651     * Check whether the entered value is the uint32array array type.
4652     *
4653     * @param { Object } value - A Uint32Array value
4654     * @returns { boolean } Returns true if the value is a built-in Uint32Array instance.
4655     * @syscap SystemCapability.Utils.Lang
4656     * @crossplatform
4657     * @since 10
4658     */
4659    /**
4660     * Check whether the entered value is the uint32array array type.
4661     *
4662     * @param { Object } value - A Uint32Array value
4663     * @returns { boolean } Returns true if the value is a built-in Uint32Array instance.
4664     * @syscap SystemCapability.Utils.Lang
4665     * @crossplatform
4666     * @atomicservice
4667     * @since 12
4668     */
4669    isUint32Array(value: Object): boolean;
4670    /**
4671     * Check whether the entered value is of type weakmap.
4672     *
4673     * @param { Object } value - A WeakMap value
4674     * @returns { boolean } Returns true if the value is a built-in WeakMap instance.
4675     * @syscap SystemCapability.Utils.Lang
4676     * @since 8
4677     */
4678    /**
4679     * Check whether the entered value is of type weakmap.
4680     *
4681     * @param { Object } value - A WeakMap value
4682     * @returns { boolean } Returns true if the value is a built-in WeakMap instance.
4683     * @syscap SystemCapability.Utils.Lang
4684     * @crossplatform
4685     * @since 10
4686     */
4687    /**
4688     * Check whether the entered value is of type weakmap.
4689     *
4690     * @param { Object } value - A WeakMap value
4691     * @returns { boolean } Returns true if the value is a built-in WeakMap instance.
4692     * @syscap SystemCapability.Utils.Lang
4693     * @crossplatform
4694     * @atomicservice
4695     * @since 12
4696     */
4697    isWeakMap(value: Object): boolean;
4698    /**
4699     * Check whether the entered value is of type weakset.
4700     *
4701     * @param { Object } value - A WeakSet value
4702     * @returns { boolean } Returns true if the value is a built-in WeakSet instance.
4703     * @syscap SystemCapability.Utils.Lang
4704     * @since 8
4705     */
4706    /**
4707     * Check whether the entered value is of type weakset.
4708     *
4709     * @param { Object } value - A WeakSet value
4710     * @returns { boolean } Returns true if the value is a built-in WeakSet instance.
4711     * @syscap SystemCapability.Utils.Lang
4712     * @crossplatform
4713     * @since 10
4714     */
4715    /**
4716     * Check whether the entered value is of type weakset.
4717     *
4718     * @param { Object } value - A WeakSet value
4719     * @returns { boolean } Returns true if the value is a built-in WeakSet instance.
4720     * @syscap SystemCapability.Utils.Lang
4721     * @crossplatform
4722     * @atomicservice
4723     * @since 12
4724     */
4725    isWeakSet(value: Object): boolean;
4726  }
4727  /**
4728   * Insert before/after logic into a class method or replace implementation for a class method.
4729   *
4730   * @syscap SystemCapability.Utils.Lang
4731   * @crossplatform
4732   * @since 11
4733   */
4734  /**
4735   * Insert before/after logic into a class method or replace implementation for a class method.
4736   *
4737   * @syscap SystemCapability.Utils.Lang
4738   * @crossplatform
4739   * @atomicservice
4740   * @since 12
4741   */
4742  class Aspect {
4743    /**
4744     * Insert some logic before the method. In implementation the method will be replaced with a new function,
4745     * which will execute 'before' with the args 'this' and the args of the original method, and then execute
4746     * the original method. The return value of the new function is returned by the original method.
4747     *
4748     * @param { Object } targetClass - The operated class.
4749     * @param { string } methodName - The name of the operated method.
4750     * @param { boolean } isStatic - The flag whether the method is static.
4751     * @param { Function } before - The logic inserted before the method.
4752     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4753     * 1.Mandatory parameters are left unspecified;
4754     * 2.Incorrect parameter types.
4755     * @syscap SystemCapability.Utils.Lang
4756     * @crossplatform
4757     * @since 11
4758     */
4759    /**
4760     * Insert some logic before the method. In implementation the method will be replaced with a new function,
4761     * which will execute 'before' with the args 'this' and the args of the original method, and then execute
4762     * the original method. The return value of the new function is returned by the original method.
4763     *
4764     * @param { Object } targetClass - The operated class.
4765     * @param { string } methodName - The name of the operated method.
4766     * @param { boolean } isStatic - The flag whether the method is static.
4767     * @param { Function } before - The logic inserted before the method.
4768     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4769     * 1.Mandatory parameters are left unspecified;
4770     * 2.Incorrect parameter types.
4771     * @syscap SystemCapability.Utils.Lang
4772     * @crossplatform
4773     * @atomicservice
4774     * @since 12
4775     */
4776    static addBefore(targetClass: Object, methodName: string, isStatic: boolean, before: Function): void;
4777    /**
4778     * Insert some logic after the method. In implementation the method will be replaced with a new function,
4779     * which will execute the original method, and then execute 'after' with the args 'this' and the return value of
4780     * the original method, and the args of the original method. The return value of the new function is returned by 'after'.
4781     *
4782     * @param { Object } targetClass - The operated class.
4783     * @param { string } methodName - The name of the operated method.
4784     * @param { boolean } isStatic - The flag whether the method is static.
4785     * @param { Function } after - The logic inserted after the method.
4786     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4787     * 1.Mandatory parameters are left unspecified;
4788     * 2.Incorrect parameter types.
4789     * @syscap SystemCapability.Utils.Lang
4790     * @crossplatform
4791     * @since 11
4792     */
4793    /**
4794     * Insert some logic after the method. In implementation the method will be replaced with a new function,
4795     * which will execute the original method, and then execute 'after' with the args 'this' and the return value of
4796     * the original method, and the args of the original method. The return value of the new function is returned by 'after'.
4797     *
4798     * @param { Object } targetClass - The operated class.
4799     * @param { string } methodName - The name of the operated method.
4800     * @param { boolean } isStatic - The flag whether the method is static.
4801     * @param { Function } after - The logic inserted after the method.
4802     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4803     * 1.Mandatory parameters are left unspecified;
4804     * 2.Incorrect parameter types.
4805     * @syscap SystemCapability.Utils.Lang
4806     * @crossplatform
4807     * @atomicservice
4808     * @since 12
4809     */
4810    static addAfter(targetClass: Object, methodName: string, isStatic: boolean, after: Function): void;
4811    /**
4812     * Replace the original method with a new function, which will execute 'instead' with the args 'this' and the args
4813     * of the original method. The return value of the new function is returned by 'instead'.
4814     *
4815     * @param { Object } targetClass - The operated class.
4816     * @param { string } methodName - The name of the operated method.
4817     * @param { boolean } isStatic - The flag whether the method is static.
4818     * @param { Function } instead - The logic replaced with the method.
4819     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4820     * 1.Mandatory parameters are left unspecified;
4821     * 2.Incorrect parameter types.
4822     * @syscap SystemCapability.Utils.Lang
4823     * @crossplatform
4824     * @since 11
4825     */
4826    /**
4827     * Replace the original method with a new function, which will execute 'instead' with the args 'this' and the args
4828     * of the original method. The return value of the new function is returned by 'instead'.
4829     *
4830     * @param { Object } targetClass - The operated class.
4831     * @param { string } methodName - The name of the operated method.
4832     * @param { boolean } isStatic - The flag whether the method is static.
4833     * @param { Function } instead - The logic replaced with the method.
4834     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4835     * 1.Mandatory parameters are left unspecified;
4836     * 2.Incorrect parameter types.
4837     * @syscap SystemCapability.Utils.Lang
4838     * @crossplatform
4839     * @atomicservice
4840     * @since 12
4841     */
4842    static replace(targetClass: Object, methodName: string, isStatic: boolean, instead: Function) : void;
4843  }
4844  /**
4845   * Provide the ability to decode binary streams into strings. The supported encoding types include: utf-8, iso-8859-2,
4846   * koi8-r, macintosh, windows-1250, windows-1251, gbk, gb18030, big5, utf-16be, utf-16 le, etc.
4847   *
4848   * @syscap SystemCapability.Utils.Lang
4849   * @crossplatform
4850   * @atomicservice
4851   * @since 12
4852   */
4853  class StringDecoder {
4854    /**
4855     * The StringDecoder constructor.
4856     *
4857     * @param { string } [encoding] - Encoding type of the input data.Default: utf8.
4858     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4859     * 1.Mandatory parameters are left unspecified;
4860     * 2.Incorrect parameter types;
4861     * @syscap SystemCapability.Utils.Lang
4862     * @crossplatform
4863     * @atomicservice
4864     * @since 12
4865     */
4866    constructor(encoding?: string);
4867    /**
4868     * Returns a decoded string, ensuring that any incomplete multiple byte characters at the end of the Uint8Array are
4869     * omitted from the returned string and stored in an internal buffer.
4870     *
4871     * @param { string | Uint8Array } chunk - The bytes to decode.
4872     * @returns { string } Returns a decoded string.
4873     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4874     * 1.Mandatory parameters are left unspecified;
4875     * 2.Incorrect parameter types;
4876     * @syscap SystemCapability.Utils.Lang
4877     * @crossplatform
4878     * @atomicservice
4879     * @since 12
4880     */
4881    write(chunk: string | Uint8Array): string;
4882    /**
4883     * Returns any remaining input stored in the internal buffer as a string. After end() is called,
4884     * this object can be reused for new input.
4885     *
4886     * @param { string | Uint8Array } [chunk] - The bytes to decode.
4887     * @returns { string } Returns any remaining input stored in the internal buffer as a string.
4888     * @throws { BusinessError } 401 - Parameter error. Possible causes:
4889     * 1.Mandatory parameters are left unspecified;
4890     * 2.Incorrect parameter types;
4891     * @syscap SystemCapability.Utils.Lang
4892     * @crossplatform
4893     * @atomicservice
4894     * @since 12
4895     */
4896    end(chunk?: string | Uint8Array): string;
4897  }
4898}
4899export default util;
4900