161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit ArkTS 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ci/** 2261847f8eSopenharmony_ci * TextDecoder support full encoding in ICU data utf-8 utf-16 iso8859 must support in all device, TextEncoder takes a 2361847f8eSopenharmony_ci * stream of code points as input and emits a stream of UTF-8 bytes, and system help function. 2461847f8eSopenharmony_ci * 2561847f8eSopenharmony_ci * @namespace util 2661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 2761847f8eSopenharmony_ci * @since 7 2861847f8eSopenharmony_ci */ 2961847f8eSopenharmony_ci/** 3061847f8eSopenharmony_ci * TextDecoder support full encoding in ICU data utf-8 utf-16 iso8859 must support in all device, TextEncoder takes a 3161847f8eSopenharmony_ci * stream of code points as input and emits a stream of UTF-8 bytes, and system help function. 3261847f8eSopenharmony_ci * 3361847f8eSopenharmony_ci * @namespace util 3461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 3561847f8eSopenharmony_ci * @crossplatform 3661847f8eSopenharmony_ci * @since 10 3761847f8eSopenharmony_ci */ 3861847f8eSopenharmony_ci/** 3961847f8eSopenharmony_ci * TextDecoder support full encoding in ICU data utf-8 utf-16 iso8859 must support in all device, TextEncoder takes a 4061847f8eSopenharmony_ci * stream of code points as input and emits a stream of UTF-8 bytes, and system help function. 4161847f8eSopenharmony_ci * 4261847f8eSopenharmony_ci * @namespace util 4361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 4461847f8eSopenharmony_ci * @crossplatform 4561847f8eSopenharmony_ci * @atomicservice 4661847f8eSopenharmony_ci * @since 11 4761847f8eSopenharmony_ci */ 4861847f8eSopenharmony_cideclare namespace util { 4961847f8eSopenharmony_ci /** 5061847f8eSopenharmony_ci * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented 5161847f8eSopenharmony_ci * with an n and Objects that have no user defined toString function are inspected using util.inspect() with 5261847f8eSopenharmony_ci * options { depth: 0, colors: false, compact: 3 }. 5361847f8eSopenharmony_ci * %d: Number will be used to convert all values except BigInt and Symbol. 5461847f8eSopenharmony_ci * %i: parseInt(value, 10) is used for all values except BigInt and Symbol. 5561847f8eSopenharmony_ci * %f: parseFloat(value) is used for all values except Bigint and Symbol. 5661847f8eSopenharmony_ci * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references. 5761847f8eSopenharmony_ci * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to 5861847f8eSopenharmony_ci * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including 5961847f8eSopenharmony_ci * non-enumerable properties and proxies. 6061847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting. 6161847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to 6261847f8eSopenharmony_ci * util.inspect() without options. This will show the full object not including non-enumerable properties and 6361847f8eSopenharmony_ci * proxies. 6461847f8eSopenharmony_ci * %c: CSS. This specifier is ignored and will skip any CSS passed in. 6561847f8eSopenharmony_ci * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string. 6661847f8eSopenharmony_ci * 6761847f8eSopenharmony_ci * @param { string } format - Styled string 6861847f8eSopenharmony_ci * @param { Object[] } args - Data to be formatted 6961847f8eSopenharmony_ci * @returns { string } Return the character string formatted in a specific format 7061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 7161847f8eSopenharmony_ci * @since 7 7261847f8eSopenharmony_ci * @deprecated since 9 7361847f8eSopenharmony_ci * @useinstead ohos.util.format 7461847f8eSopenharmony_ci */ 7561847f8eSopenharmony_ci function printf(format: string, ...args: Object[]): string; 7661847f8eSopenharmony_ci 7761847f8eSopenharmony_ci /** 7861847f8eSopenharmony_ci * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented 7961847f8eSopenharmony_ci * with an n and Objects that have no user defined toString function are inspected using util.inspect() with 8061847f8eSopenharmony_ci * options { depth: 0, colors: false, compact: 3 }. 8161847f8eSopenharmony_ci * %d: Number will be used to convert all values except BigInt and Symbol. 8261847f8eSopenharmony_ci * %i: parseInt(value, 10) is used for all values except BigInt and Symbol. 8361847f8eSopenharmony_ci * %f: parseFloat(value) is used for all values except Bigint and Symbol. 8461847f8eSopenharmony_ci * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references. 8561847f8eSopenharmony_ci * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to 8661847f8eSopenharmony_ci * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including 8761847f8eSopenharmony_ci * non-enumerable properties and proxies. 8861847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting. 8961847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to 9061847f8eSopenharmony_ci * util.inspect() without options. This will show the full object not including non-enumerable properties and 9161847f8eSopenharmony_ci * proxies. 9261847f8eSopenharmony_ci * %c: CSS. This specifier is ignored and will skip any CSS passed in. 9361847f8eSopenharmony_ci * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string. 9461847f8eSopenharmony_ci * 9561847f8eSopenharmony_ci * @param { string } format - Styled string 9661847f8eSopenharmony_ci * @param { Object[] } args - Data to be formatted 9761847f8eSopenharmony_ci * @returns { string } Return the character string formatted in a specific format 9861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 9961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 10061847f8eSopenharmony_ci * 2.Incorrect parameter types. 10161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 10261847f8eSopenharmony_ci * @since 9 10361847f8eSopenharmony_ci */ 10461847f8eSopenharmony_ci /** 10561847f8eSopenharmony_ci * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented 10661847f8eSopenharmony_ci * with an n and Objects that have no user defined toString function are inspected using util.inspect() with 10761847f8eSopenharmony_ci * options { depth: 0, colors: false, compact: 3 }. 10861847f8eSopenharmony_ci * %d: Number will be used to convert all values except BigInt and Symbol. 10961847f8eSopenharmony_ci * %i: parseInt(value, 10) is used for all values except BigInt and Symbol. 11061847f8eSopenharmony_ci * %f: parseFloat(value) is used for all values except Bigint and Symbol. 11161847f8eSopenharmony_ci * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references. 11261847f8eSopenharmony_ci * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to 11361847f8eSopenharmony_ci * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including 11461847f8eSopenharmony_ci * non-enumerable properties and proxies. 11561847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting. 11661847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to 11761847f8eSopenharmony_ci * util.inspect() without options. This will show the full object not including non-enumerable properties and 11861847f8eSopenharmony_ci * proxies. 11961847f8eSopenharmony_ci * %c: CSS. This specifier is ignored and will skip any CSS passed in. 12061847f8eSopenharmony_ci * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string. 12161847f8eSopenharmony_ci * 12261847f8eSopenharmony_ci * @param { string } format - Styled string 12361847f8eSopenharmony_ci * @param { Object[] } args - Data to be formatted 12461847f8eSopenharmony_ci * @returns { string } a string formatted in a specific format. 12561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 12661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 12761847f8eSopenharmony_ci * 2.Incorrect parameter types. 12861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 12961847f8eSopenharmony_ci * @crossplatform 13061847f8eSopenharmony_ci * @since 10 13161847f8eSopenharmony_ci */ 13261847f8eSopenharmony_ci /** 13361847f8eSopenharmony_ci * %s: String will be used to convert all values except BigInt, Object and -0. BigInt values will be represented 13461847f8eSopenharmony_ci * with an n and Objects that have no user defined toString function are inspected using util.inspect() with 13561847f8eSopenharmony_ci * options { depth: 0, colors: false, compact: 3 }. 13661847f8eSopenharmony_ci * %d: Number will be used to convert all values except BigInt and Symbol. 13761847f8eSopenharmony_ci * %i: parseInt(value, 10) is used for all values except BigInt and Symbol. 13861847f8eSopenharmony_ci * %f: parseFloat(value) is used for all values except Bigint and Symbol. 13961847f8eSopenharmony_ci * %j: JSON. Replaced with the string '[Circular]' if the argument contains circular references. 14061847f8eSopenharmony_ci * %o: Object. A string representation of an object with generic JavaScript object formatting.Similar to 14161847f8eSopenharmony_ci * util.inspect() with options { showHidden: true, showProxy: true}. This will show the full object including 14261847f8eSopenharmony_ci * non-enumerable properties and proxies. 14361847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting. 14461847f8eSopenharmony_ci * %O: Object. A string representation of an object with generic JavaScript object formatting.Similar to 14561847f8eSopenharmony_ci * util.inspect() without options. This will show the full object not including non-enumerable properties and 14661847f8eSopenharmony_ci * proxies. 14761847f8eSopenharmony_ci * %c: CSS. This specifier is ignored and will skip any CSS passed in. 14861847f8eSopenharmony_ci * %%: single percent sign ('%'). This does not consume an argument.Returns: <string> The formatted string. 14961847f8eSopenharmony_ci * 15061847f8eSopenharmony_ci * @param { string } format - Styled string 15161847f8eSopenharmony_ci * @param { Object[] } args - Data to be formatted 15261847f8eSopenharmony_ci * @returns { string } a string formatted in a specific format. 15361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 15461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 15561847f8eSopenharmony_ci * 2.Incorrect parameter types. 15661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 15761847f8eSopenharmony_ci * @crossplatform 15861847f8eSopenharmony_ci * @atomicservice 15961847f8eSopenharmony_ci * @since 12 16061847f8eSopenharmony_ci */ 16161847f8eSopenharmony_ci function format(format: string, ...args: Object[]): string; 16261847f8eSopenharmony_ci 16361847f8eSopenharmony_ci /** 16461847f8eSopenharmony_ci * Get the string name of the system errno. 16561847f8eSopenharmony_ci * 16661847f8eSopenharmony_ci * @param { number } errno - The error code generated by an error in the system 16761847f8eSopenharmony_ci * @returns { string } Return the string name of a system errno 16861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 16961847f8eSopenharmony_ci * @since 7 17061847f8eSopenharmony_ci * @deprecated since 9 17161847f8eSopenharmony_ci * @useinstead ohos.util.errnoToString 17261847f8eSopenharmony_ci */ 17361847f8eSopenharmony_ci function getErrorString(errno: number): string; 17461847f8eSopenharmony_ci 17561847f8eSopenharmony_ci /** 17661847f8eSopenharmony_ci * Get the string name of the system errno. 17761847f8eSopenharmony_ci * 17861847f8eSopenharmony_ci * @param { number } errno - The error code generated by an error in the system 17961847f8eSopenharmony_ci * @returns { string } Return the string name of a system errno 18061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 18161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 18261847f8eSopenharmony_ci * 2.Incorrect parameter types. 18361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 18461847f8eSopenharmony_ci * @since 9 18561847f8eSopenharmony_ci */ 18661847f8eSopenharmony_ci /** 18761847f8eSopenharmony_ci * Get the string name of the system errno. 18861847f8eSopenharmony_ci * 18961847f8eSopenharmony_ci * @param { number } errno - The error code generated by an error in the system 19061847f8eSopenharmony_ci * @returns { string } Return the string name of a system errno 19161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 19261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 19361847f8eSopenharmony_ci * 2.Incorrect parameter types. 19461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 19561847f8eSopenharmony_ci * @crossplatform 19661847f8eSopenharmony_ci * @since 10 19761847f8eSopenharmony_ci */ 19861847f8eSopenharmony_ci /** 19961847f8eSopenharmony_ci * Get the string name of the system errno. 20061847f8eSopenharmony_ci * 20161847f8eSopenharmony_ci * @param { number } errno - The error code generated by an error in the system 20261847f8eSopenharmony_ci * @returns { string } Return the string name of a system errno 20361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 20461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 20561847f8eSopenharmony_ci * 2.Incorrect parameter types. 20661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 20761847f8eSopenharmony_ci * @crossplatform 20861847f8eSopenharmony_ci * @atomicservice 20961847f8eSopenharmony_ci * @since 12 21061847f8eSopenharmony_ci */ 21161847f8eSopenharmony_ci function errnoToString(errno: number): string; 21261847f8eSopenharmony_ci 21361847f8eSopenharmony_ci /** 21461847f8eSopenharmony_ci * Takes an async function (or a function that returns a Promise) and returns a function following the 21561847f8eSopenharmony_ci * error-first callback style. 21661847f8eSopenharmony_ci * 21761847f8eSopenharmony_ci * @param { Function } original - Asynchronous function 21861847f8eSopenharmony_ci * @returns { function } Return a Asynchronous function 21961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 22061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 22161847f8eSopenharmony_ci * 2.Incorrect parameter types. 22261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 22361847f8eSopenharmony_ci * @since 7 22461847f8eSopenharmony_ci */ 22561847f8eSopenharmony_ci /** 22661847f8eSopenharmony_ci * Takes an async function (or a function that returns a Promise) and returns a function following the 22761847f8eSopenharmony_ci * error-first callback style. 22861847f8eSopenharmony_ci * 22961847f8eSopenharmony_ci * @param { Function } original - Asynchronous function 23061847f8eSopenharmony_ci * @returns { function } Return a Asynchronous function 23161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 23261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 23361847f8eSopenharmony_ci * 2.Incorrect parameter types. 23461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 23561847f8eSopenharmony_ci * @crossplatform 23661847f8eSopenharmony_ci * @since 10 23761847f8eSopenharmony_ci */ 23861847f8eSopenharmony_ci /** 23961847f8eSopenharmony_ci * Takes an async function (or a function that returns a Promise) and returns a function following the 24061847f8eSopenharmony_ci * error-first callback style. 24161847f8eSopenharmony_ci * 24261847f8eSopenharmony_ci * @param { Function } original - Asynchronous function 24361847f8eSopenharmony_ci * @returns { function } Return a Asynchronous function 24461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 24561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 24661847f8eSopenharmony_ci * 2.Incorrect parameter types. 24761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 24861847f8eSopenharmony_ci * @crossplatform 24961847f8eSopenharmony_ci * @atomicservice 25061847f8eSopenharmony_ci * @since 12 25161847f8eSopenharmony_ci */ 25261847f8eSopenharmony_ci function callbackWrapper(original: Function): (err: Object, value: Object) => void; 25361847f8eSopenharmony_ci 25461847f8eSopenharmony_ci /** 25561847f8eSopenharmony_ci * Takes a function following the common error-first callback style, i.e taking an (err, value) => 25661847f8eSopenharmony_ci * callback as the last argument, and return a function that returns promises. 25761847f8eSopenharmony_ci * 25861847f8eSopenharmony_ci * @param { function } original - Asynchronous function 25961847f8eSopenharmony_ci * @returns { function } Return a function that returns promises 26061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 26161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 26261847f8eSopenharmony_ci * 2.Incorrect parameter types. 26361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 26461847f8eSopenharmony_ci * @since 9 26561847f8eSopenharmony_ci */ 26661847f8eSopenharmony_ci /** 26761847f8eSopenharmony_ci * Takes a function following the common error-first callback style, i.e taking an (err, value) => 26861847f8eSopenharmony_ci * callback as the last argument, and return a function that returns promises. 26961847f8eSopenharmony_ci * 27061847f8eSopenharmony_ci * @param { function } original - Asynchronous function 27161847f8eSopenharmony_ci * @returns { Function } Return a function that returns promises 27261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 27361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 27461847f8eSopenharmony_ci * 2.Incorrect parameter types. 27561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 27661847f8eSopenharmony_ci * @crossplatform 27761847f8eSopenharmony_ci * @since 10 27861847f8eSopenharmony_ci */ 27961847f8eSopenharmony_ci /** 28061847f8eSopenharmony_ci * Takes a function following the common error-first callback style, i.e taking an (err, value) => 28161847f8eSopenharmony_ci * callback as the last argument, and return a function that returns promises. 28261847f8eSopenharmony_ci * 28361847f8eSopenharmony_ci * @param { function } original - Asynchronous function 28461847f8eSopenharmony_ci * @returns { Function } Return a function that returns promises 28561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 28661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 28761847f8eSopenharmony_ci * 2.Incorrect parameter types. 28861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 28961847f8eSopenharmony_ci * @crossplatform 29061847f8eSopenharmony_ci * @atomicservice 29161847f8eSopenharmony_ci * @since 12 29261847f8eSopenharmony_ci */ 29361847f8eSopenharmony_ci function promisify(original: (err: Object, value: Object) => void): Function; 29461847f8eSopenharmony_ci 29561847f8eSopenharmony_ci /** 29661847f8eSopenharmony_ci * Takes a function following the common error-first callback style, i.e taking an (err, value) => 29761847f8eSopenharmony_ci * callback as the last argument, and return a version that returns promises. 29861847f8eSopenharmony_ci * 29961847f8eSopenharmony_ci * @param { function } original - Asynchronous function 30061847f8eSopenharmony_ci * @returns { Object } Return a version that returns promises 30161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 30261847f8eSopenharmony_ci * @since 7 30361847f8eSopenharmony_ci * @deprecated since 9 30461847f8eSopenharmony_ci * @useinstead ohos.util.promisify 30561847f8eSopenharmony_ci */ 30661847f8eSopenharmony_ci function promiseWrapper(original: (err: Object, value: Object) => void): Object; 30761847f8eSopenharmony_ci 30861847f8eSopenharmony_ci /** 30961847f8eSopenharmony_ci * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. 31061847f8eSopenharmony_ci * 31161847f8eSopenharmony_ci * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. 31261847f8eSopenharmony_ci * @returns { string } Return a string representing this UUID. 31361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 31461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 31561847f8eSopenharmony_ci * @since 9 31661847f8eSopenharmony_ci */ 31761847f8eSopenharmony_ci /** 31861847f8eSopenharmony_ci * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. 31961847f8eSopenharmony_ci * 32061847f8eSopenharmony_ci * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. 32161847f8eSopenharmony_ci * @returns { string } Return a string representing this UUID. 32261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 32361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 32461847f8eSopenharmony_ci * @crossplatform 32561847f8eSopenharmony_ci * @since 10 32661847f8eSopenharmony_ci */ 32761847f8eSopenharmony_ci /** 32861847f8eSopenharmony_ci * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. 32961847f8eSopenharmony_ci * 33061847f8eSopenharmony_ci * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. 33161847f8eSopenharmony_ci * @returns { string } Return a string representing this UUID. 33261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 33361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 33461847f8eSopenharmony_ci * @crossplatform 33561847f8eSopenharmony_ci * @atomicservice 33661847f8eSopenharmony_ci * @since 12 33761847f8eSopenharmony_ci */ 33861847f8eSopenharmony_ci function generateRandomUUID(entropyCache?: boolean): string; 33961847f8eSopenharmony_ci 34061847f8eSopenharmony_ci /** 34161847f8eSopenharmony_ci * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator. 34261847f8eSopenharmony_ci * 34361847f8eSopenharmony_ci * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. 34461847f8eSopenharmony_ci * @returns { Uint8Array } Return a Uint8Array representing this UUID. 34561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 34661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 34761847f8eSopenharmony_ci * @since 9 34861847f8eSopenharmony_ci */ 34961847f8eSopenharmony_ci /** 35061847f8eSopenharmony_ci * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator. 35161847f8eSopenharmony_ci * 35261847f8eSopenharmony_ci * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. 35361847f8eSopenharmony_ci * @returns { Uint8Array } Return a Uint8Array representing this UUID. 35461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 35561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 35661847f8eSopenharmony_ci * @crossplatform 35761847f8eSopenharmony_ci * @since 10 35861847f8eSopenharmony_ci */ 35961847f8eSopenharmony_ci /** 36061847f8eSopenharmony_ci * Generate a random RFC 4122 version 4 binary UUID using a cryptographically secure random number generator. 36161847f8eSopenharmony_ci * 36261847f8eSopenharmony_ci * @param { boolean } [entropyCache] - Whether to generate the UUID with using the cache. Default: true. 36361847f8eSopenharmony_ci * @returns { Uint8Array } Return a Uint8Array representing this UUID. 36461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 36561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 36661847f8eSopenharmony_ci * @crossplatform 36761847f8eSopenharmony_ci * @atomicservice 36861847f8eSopenharmony_ci * @since 12 36961847f8eSopenharmony_ci */ 37061847f8eSopenharmony_ci function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array; 37161847f8eSopenharmony_ci 37261847f8eSopenharmony_ci /** 37361847f8eSopenharmony_ci * Parse a UUID from the string standard representation as described in the RFC 4122 version 4. 37461847f8eSopenharmony_ci * 37561847f8eSopenharmony_ci * @param { string } uuid - String that specifies a UUID 37661847f8eSopenharmony_ci * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails. 37761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 37861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 37961847f8eSopenharmony_ci * @since 9 38061847f8eSopenharmony_ci */ 38161847f8eSopenharmony_ci /** 38261847f8eSopenharmony_ci * Parse a UUID from the string standard representation as described in the RFC 4122 version 4. 38361847f8eSopenharmony_ci * 38461847f8eSopenharmony_ci * @param { string } uuid - String that specifies a UUID 38561847f8eSopenharmony_ci * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails. 38661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 38761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 38861847f8eSopenharmony_ci * @crossplatform 38961847f8eSopenharmony_ci * @since 10 39061847f8eSopenharmony_ci */ 39161847f8eSopenharmony_ci /** 39261847f8eSopenharmony_ci * Parse a UUID from the string standard representation as described in the RFC 4122 version 4. 39361847f8eSopenharmony_ci * 39461847f8eSopenharmony_ci * @param { string } uuid - String that specifies a UUID 39561847f8eSopenharmony_ci * @returns { Uint8Array } Return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails. 39661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 39761847f8eSopenharmony_ci * @throws { BusinessError } 10200002 - Invalid uuid string. 39861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 39961847f8eSopenharmony_ci * @crossplatform 40061847f8eSopenharmony_ci * @atomicservice 40161847f8eSopenharmony_ci * @since 12 40261847f8eSopenharmony_ci */ 40361847f8eSopenharmony_ci function parseUUID(uuid: string): Uint8Array; 40461847f8eSopenharmony_ci 40561847f8eSopenharmony_ci /** 40661847f8eSopenharmony_ci * Get the hash code of an object. 40761847f8eSopenharmony_ci * 40861847f8eSopenharmony_ci * @param { object } [object] - The object that need to get hash code. 40961847f8eSopenharmony_ci * @returns { number } Return a hash code of an object. 41061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 41161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 41261847f8eSopenharmony_ci * 2.Incorrect parameter types. 41361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 41461847f8eSopenharmony_ci * @crossplatform 41561847f8eSopenharmony_ci * @atomicservice 41661847f8eSopenharmony_ci * @since 12 41761847f8eSopenharmony_ci */ 41861847f8eSopenharmony_ci function getHash(object: object): number; 41961847f8eSopenharmony_ci 42061847f8eSopenharmony_ci /** 42161847f8eSopenharmony_ci * Defines the TextDecoder related options parameters. 42261847f8eSopenharmony_ci * 42361847f8eSopenharmony_ci * @interface TextDecoderOptions 42461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 42561847f8eSopenharmony_ci * @crossplatform 42661847f8eSopenharmony_ci * @atomicservice 42761847f8eSopenharmony_ci * @since 11 42861847f8eSopenharmony_ci */ 42961847f8eSopenharmony_ci interface TextDecoderOptions { 43061847f8eSopenharmony_ci /** 43161847f8eSopenharmony_ci * Is a fatal error displayed? The default value is false. 43261847f8eSopenharmony_ci * @type { ?boolean } 43361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 43461847f8eSopenharmony_ci * @crossplatform 43561847f8eSopenharmony_ci * @atomicservice 43661847f8eSopenharmony_ci * @since 11 43761847f8eSopenharmony_ci */ 43861847f8eSopenharmony_ci fatal?: boolean; 43961847f8eSopenharmony_ci /** 44061847f8eSopenharmony_ci * Do you want to ignore BOM tags? The default value is false. 44161847f8eSopenharmony_ci * @type { ?boolean } 44261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 44361847f8eSopenharmony_ci * @crossplatform 44461847f8eSopenharmony_ci * @atomicservice 44561847f8eSopenharmony_ci * @since 11 44661847f8eSopenharmony_ci */ 44761847f8eSopenharmony_ci ignoreBOM?: boolean; 44861847f8eSopenharmony_ci } 44961847f8eSopenharmony_ci 45061847f8eSopenharmony_ci /** 45161847f8eSopenharmony_ci * Defines the decode with stream related options parameters. 45261847f8eSopenharmony_ci * 45361847f8eSopenharmony_ci * @interface DecodeWithStreamOptions 45461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 45561847f8eSopenharmony_ci * @crossplatform 45661847f8eSopenharmony_ci * @atomicservice 45761847f8eSopenharmony_ci * @since 11 45861847f8eSopenharmony_ci */ 45961847f8eSopenharmony_ci interface DecodeWithStreamOptions { 46061847f8eSopenharmony_ci /** 46161847f8eSopenharmony_ci * Does the call follow additional data blocks. The default value is false. 46261847f8eSopenharmony_ci * @type { ?boolean } 46361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 46461847f8eSopenharmony_ci * @crossplatform 46561847f8eSopenharmony_ci * @atomicservice 46661847f8eSopenharmony_ci * @since 11 46761847f8eSopenharmony_ci */ 46861847f8eSopenharmony_ci stream?: boolean; 46961847f8eSopenharmony_ci } 47061847f8eSopenharmony_ci 47161847f8eSopenharmony_ci /** 47261847f8eSopenharmony_ci * Defines the decode with stream related options parameters. 47361847f8eSopenharmony_ci * 47461847f8eSopenharmony_ci * @interface DecodeToStringOptions 47561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 47661847f8eSopenharmony_ci * @crossplatform 47761847f8eSopenharmony_ci * @atomicservice 47861847f8eSopenharmony_ci * @since 12 47961847f8eSopenharmony_ci */ 48061847f8eSopenharmony_ci interface DecodeToStringOptions { 48161847f8eSopenharmony_ci /** 48261847f8eSopenharmony_ci * Stream option controls stream processing in decoding. The default value is false. 48361847f8eSopenharmony_ci * @type { ?boolean } 48461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 48561847f8eSopenharmony_ci * @crossplatform 48661847f8eSopenharmony_ci * @atomicservice 48761847f8eSopenharmony_ci * @since 12 48861847f8eSopenharmony_ci */ 48961847f8eSopenharmony_ci stream?: boolean; 49061847f8eSopenharmony_ci } 49161847f8eSopenharmony_ci 49261847f8eSopenharmony_ci /** 49361847f8eSopenharmony_ci * The TextDecoder represents a text decoder that accepts a string as input, 49461847f8eSopenharmony_ci * decodes it in UTF-8 format, and outputs UTF-8 byte stream. 49561847f8eSopenharmony_ci * 49661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 49761847f8eSopenharmony_ci * @since 7 49861847f8eSopenharmony_ci */ 49961847f8eSopenharmony_ci /** 50061847f8eSopenharmony_ci * The TextDecoder represents a text decoder that accepts a string as input, 50161847f8eSopenharmony_ci * decodes it in UTF-8 format, and outputs UTF-8 byte stream. 50261847f8eSopenharmony_ci * 50361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 50461847f8eSopenharmony_ci * @crossplatform 50561847f8eSopenharmony_ci * @since 10 50661847f8eSopenharmony_ci */ 50761847f8eSopenharmony_ci /** 50861847f8eSopenharmony_ci * The TextDecoder represents a text decoder that accepts a string as input, 50961847f8eSopenharmony_ci * decodes it in UTF-8 format, and outputs UTF-8 byte stream. 51061847f8eSopenharmony_ci * 51161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 51261847f8eSopenharmony_ci * @crossplatform 51361847f8eSopenharmony_ci * @atomicservice 51461847f8eSopenharmony_ci * @since 11 51561847f8eSopenharmony_ci */ 51661847f8eSopenharmony_ci class TextDecoder { 51761847f8eSopenharmony_ci /** 51861847f8eSopenharmony_ci * The textDecoder constructor. 51961847f8eSopenharmony_ci * 52061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 52161847f8eSopenharmony_ci * @since 9 52261847f8eSopenharmony_ci */ 52361847f8eSopenharmony_ci /** 52461847f8eSopenharmony_ci * The textDecoder constructor. 52561847f8eSopenharmony_ci * 52661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 52761847f8eSopenharmony_ci * @crossplatform 52861847f8eSopenharmony_ci * @since 10 52961847f8eSopenharmony_ci */ 53061847f8eSopenharmony_ci /** 53161847f8eSopenharmony_ci * The textDecoder constructor. 53261847f8eSopenharmony_ci * 53361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 53461847f8eSopenharmony_ci * @crossplatform 53561847f8eSopenharmony_ci * @atomicservice 53661847f8eSopenharmony_ci * @since 12 53761847f8eSopenharmony_ci */ 53861847f8eSopenharmony_ci constructor(); 53961847f8eSopenharmony_ci 54061847f8eSopenharmony_ci /** 54161847f8eSopenharmony_ci * The source encoding's name, lowercased. 54261847f8eSopenharmony_ci * 54361847f8eSopenharmony_ci * @type { string } 54461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 54561847f8eSopenharmony_ci * @since 7 54661847f8eSopenharmony_ci */ 54761847f8eSopenharmony_ci /** 54861847f8eSopenharmony_ci * The source encoding's name, lowercased. 54961847f8eSopenharmony_ci * 55061847f8eSopenharmony_ci * @type { string } 55161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 55261847f8eSopenharmony_ci * @crossplatform 55361847f8eSopenharmony_ci * @since 10 55461847f8eSopenharmony_ci */ 55561847f8eSopenharmony_ci /** 55661847f8eSopenharmony_ci * The source encoding's name, lowercased. 55761847f8eSopenharmony_ci * 55861847f8eSopenharmony_ci * @type { string } 55961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 56061847f8eSopenharmony_ci * @crossplatform 56161847f8eSopenharmony_ci * @atomicservice 56261847f8eSopenharmony_ci * @since 12 56361847f8eSopenharmony_ci */ 56461847f8eSopenharmony_ci readonly encoding: string; 56561847f8eSopenharmony_ci 56661847f8eSopenharmony_ci /** 56761847f8eSopenharmony_ci * Returns `true` if error mode is "fatal", and `false` otherwise. 56861847f8eSopenharmony_ci * 56961847f8eSopenharmony_ci * @type { boolean } 57061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 57161847f8eSopenharmony_ci * @since 7 57261847f8eSopenharmony_ci */ 57361847f8eSopenharmony_ci /** 57461847f8eSopenharmony_ci * Returns `true` if error mode is "fatal", and `false` otherwise. 57561847f8eSopenharmony_ci * 57661847f8eSopenharmony_ci * @type { boolean } 57761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 57861847f8eSopenharmony_ci * @crossplatform 57961847f8eSopenharmony_ci * @since 10 58061847f8eSopenharmony_ci */ 58161847f8eSopenharmony_ci /** 58261847f8eSopenharmony_ci * Returns `true` if error mode is "fatal", and `false` otherwise. 58361847f8eSopenharmony_ci * 58461847f8eSopenharmony_ci * @type { boolean } 58561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 58661847f8eSopenharmony_ci * @crossplatform 58761847f8eSopenharmony_ci * @atomicservice 58861847f8eSopenharmony_ci * @since 12 58961847f8eSopenharmony_ci */ 59061847f8eSopenharmony_ci readonly fatal: boolean; 59161847f8eSopenharmony_ci 59261847f8eSopenharmony_ci /** 59361847f8eSopenharmony_ci * Returns `true` if ignore BOM flag is set, and `false` otherwise. 59461847f8eSopenharmony_ci * 59561847f8eSopenharmony_ci * @type { false } 59661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 59761847f8eSopenharmony_ci * @since 7 59861847f8eSopenharmony_ci */ 59961847f8eSopenharmony_ci /** 60061847f8eSopenharmony_ci * Returns `true` if ignore BOM flag is set, and `false` otherwise. 60161847f8eSopenharmony_ci * 60261847f8eSopenharmony_ci * @type { false } 60361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 60461847f8eSopenharmony_ci * @crossplatform 60561847f8eSopenharmony_ci * @since 10 60661847f8eSopenharmony_ci */ 60761847f8eSopenharmony_ci /** 60861847f8eSopenharmony_ci * Returns `true` if ignore BOM flag is set, and `false` otherwise. 60961847f8eSopenharmony_ci * 61061847f8eSopenharmony_ci * @type { false } 61161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 61261847f8eSopenharmony_ci * @crossplatform 61361847f8eSopenharmony_ci * @atomicservice 61461847f8eSopenharmony_ci * @since 12 61561847f8eSopenharmony_ci */ 61661847f8eSopenharmony_ci readonly ignoreBOM = false; 61761847f8eSopenharmony_ci 61861847f8eSopenharmony_ci /** 61961847f8eSopenharmony_ci * The textDecoder constructor. 62061847f8eSopenharmony_ci * 62161847f8eSopenharmony_ci * @param { string } encoding - Decoding format 62261847f8eSopenharmony_ci * @param { object } options - Options 62361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 62461847f8eSopenharmony_ci * @since 7 62561847f8eSopenharmony_ci * @deprecated since 9 62661847f8eSopenharmony_ci * @useinstead ohos.util.TextDecoder.create 62761847f8eSopenharmony_ci */ 62861847f8eSopenharmony_ci constructor(encoding?: string, options?: { fatal?: boolean; ignoreBOM?: boolean }); 62961847f8eSopenharmony_ci 63061847f8eSopenharmony_ci /** 63161847f8eSopenharmony_ci * Replaces the original constructor to process arguments and return a textDecoder object. 63261847f8eSopenharmony_ci * 63361847f8eSopenharmony_ci * @param { string } encoding - Decoding format 63461847f8eSopenharmony_ci * @param { object } options - Options 63561847f8eSopenharmony_ci * @returns { TextDecoder } 63661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 63761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 63861847f8eSopenharmony_ci * @since 9 63961847f8eSopenharmony_ci */ 64061847f8eSopenharmony_ci /** 64161847f8eSopenharmony_ci * Replaces the original constructor to process arguments and return a textDecoder object. 64261847f8eSopenharmony_ci * 64361847f8eSopenharmony_ci * @param { string } encoding - Decoding format 64461847f8eSopenharmony_ci * @param { object } options - Options 64561847f8eSopenharmony_ci * @returns { TextDecoder } 64661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 64761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 64861847f8eSopenharmony_ci * @crossplatform 64961847f8eSopenharmony_ci * @since 10 65061847f8eSopenharmony_ci */ 65161847f8eSopenharmony_ci /** 65261847f8eSopenharmony_ci * Replaces the original constructor to process arguments and return a textDecoder object. 65361847f8eSopenharmony_ci * 65461847f8eSopenharmony_ci * @param { string } [encoding] - Decoding format 65561847f8eSopenharmony_ci * @param { TextDecoderOptions } [options] - Options 65661847f8eSopenharmony_ci * @returns { TextDecoder } 65761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 65861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 65961847f8eSopenharmony_ci * @crossplatform 66061847f8eSopenharmony_ci * @atomicservice 66161847f8eSopenharmony_ci * @since 11 66261847f8eSopenharmony_ci */ 66361847f8eSopenharmony_ci static create(encoding?: string, options?: TextDecoderOptions): TextDecoder; 66461847f8eSopenharmony_ci 66561847f8eSopenharmony_ci /** 66661847f8eSopenharmony_ci * Returns the result of running encoding's decoder. 66761847f8eSopenharmony_ci * 66861847f8eSopenharmony_ci * @param { Uint8Array } input - Decoded numbers in accordance with the format 66961847f8eSopenharmony_ci * @param { object } options - Options 67061847f8eSopenharmony_ci * @returns { string } Return decoded text 67161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 67261847f8eSopenharmony_ci * @since 7 67361847f8eSopenharmony_ci * @deprecated since 9 67461847f8eSopenharmony_ci * @useinstead ohos.util.decodeWithStream 67561847f8eSopenharmony_ci */ 67661847f8eSopenharmony_ci decode(input: Uint8Array, options?: { stream?: false }): string; 67761847f8eSopenharmony_ci 67861847f8eSopenharmony_ci /** 67961847f8eSopenharmony_ci * Decodes the input and returns a string. If options.stream is true, any incomplete byte sequences occurring 68061847f8eSopenharmony_ci * at the end of the input are buffered internally and emitted after the next call to textDecoder.decode(). 68161847f8eSopenharmony_ci * If textDecoder.fatal is true, decoding errors that occur will result in a TypeError being thrown. 68261847f8eSopenharmony_ci * 68361847f8eSopenharmony_ci * @param { Uint8Array } input - Decoded numbers in accordance with the format 68461847f8eSopenharmony_ci * @param { object } options - Options 68561847f8eSopenharmony_ci * @returns { string } Return decoded text 68661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 68761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 68861847f8eSopenharmony_ci * 2.Incorrect parameter types. 68961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 69061847f8eSopenharmony_ci * @since 9 69161847f8eSopenharmony_ci */ 69261847f8eSopenharmony_ci /** 69361847f8eSopenharmony_ci * Decodes the input and returns a string. If options.stream is true, any incomplete byte sequences occurring 69461847f8eSopenharmony_ci * at the end of the input are buffered internally and emitted after the next call to textDecoder.decode(). 69561847f8eSopenharmony_ci * If textDecoder.fatal is true, decoding errors that occur will result in a TypeError being thrown. 69661847f8eSopenharmony_ci * 69761847f8eSopenharmony_ci * @param { Uint8Array } input - Decoded numbers in accordance with the format 69861847f8eSopenharmony_ci * @param { object } options - Options 69961847f8eSopenharmony_ci * @returns { string } Return decoded text 70061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 70161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 70261847f8eSopenharmony_ci * 2.Incorrect parameter types. 70361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 70461847f8eSopenharmony_ci * @crossplatform 70561847f8eSopenharmony_ci * @since 10 70661847f8eSopenharmony_ci */ 70761847f8eSopenharmony_ci /** 70861847f8eSopenharmony_ci * Decodes the input and returns a string. If options.stream is true, any incomplete byte sequences occurring 70961847f8eSopenharmony_ci * at the end of the input are buffered internally and emitted after the next call to textDecoder.decode(). 71061847f8eSopenharmony_ci * If textDecoder.fatal is true, decoding errors that occur will result in a TypeError being thrown. 71161847f8eSopenharmony_ci * 71261847f8eSopenharmony_ci * @param { Uint8Array } input - Decoded numbers in accordance with the format 71361847f8eSopenharmony_ci * @param { DecodeWithStreamOptions } [options] - Options 71461847f8eSopenharmony_ci * @returns { string } Return decoded text 71561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 71661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 71761847f8eSopenharmony_ci * 2.Incorrect parameter types. 71861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 71961847f8eSopenharmony_ci * @crossplatform 72061847f8eSopenharmony_ci * @atomicservice 72161847f8eSopenharmony_ci * @since 11 72261847f8eSopenharmony_ci * @deprecated since 12 72361847f8eSopenharmony_ci * @useinstead ohos.util.decodeToString 72461847f8eSopenharmony_ci */ 72561847f8eSopenharmony_ci decodeWithStream(input: Uint8Array, options?: DecodeWithStreamOptions): string; 72661847f8eSopenharmony_ci /** 72761847f8eSopenharmony_ci * The input is decoded and a string is returned. 72861847f8eSopenharmony_ci * If options.stream is set to true, any incomplete byte sequences found at the end of the input are internally 72961847f8eSopenharmony_ci * buffered and will be emitted after the next call to textDecoder.decodeToString(). 73061847f8eSopenharmony_ci * If textDecoder.fatal is set to true, any decoding errors that occur will result in a TypeError being thrown. 73161847f8eSopenharmony_ci * 73261847f8eSopenharmony_ci * @param { Uint8Array } input - Decoded numbers in accordance with the format. 73361847f8eSopenharmony_ci * @param { DecodeToStringOptions } [options] - The default option is set to false. 73461847f8eSopenharmony_ci * @returns { string } Return decoded text 73561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 73661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 73761847f8eSopenharmony_ci * 2.Incorrect parameter types. 73861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 73961847f8eSopenharmony_ci * @crossplatform 74061847f8eSopenharmony_ci * @atomicservice 74161847f8eSopenharmony_ci * @since 12 74261847f8eSopenharmony_ci */ 74361847f8eSopenharmony_ci decodeToString(input: Uint8Array, options?: DecodeToStringOptions): string; 74461847f8eSopenharmony_ci } 74561847f8eSopenharmony_ci 74661847f8eSopenharmony_ci /** 74761847f8eSopenharmony_ci * Return encoded text. 74861847f8eSopenharmony_ci * 74961847f8eSopenharmony_ci * @interface EncodeIntoUint8ArrayInfo 75061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 75161847f8eSopenharmony_ci * @crossplatform 75261847f8eSopenharmony_ci * @atomicservice 75361847f8eSopenharmony_ci * @since 11 75461847f8eSopenharmony_ci */ 75561847f8eSopenharmony_ci interface EncodeIntoUint8ArrayInfo { 75661847f8eSopenharmony_ci /** 75761847f8eSopenharmony_ci * The read represents the number of characters that have been encoded. 75861847f8eSopenharmony_ci * @type { number } 75961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 76061847f8eSopenharmony_ci * @crossplatform 76161847f8eSopenharmony_ci * @atomicservice 76261847f8eSopenharmony_ci * @since 11 76361847f8eSopenharmony_ci */ 76461847f8eSopenharmony_ci read: number; 76561847f8eSopenharmony_ci /** 76661847f8eSopenharmony_ci * The written represents the number of bytes occupied by the encoded characters. 76761847f8eSopenharmony_ci * @type { number } 76861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 76961847f8eSopenharmony_ci * @crossplatform 77061847f8eSopenharmony_ci * @atomicservice 77161847f8eSopenharmony_ci * @since 11 77261847f8eSopenharmony_ci */ 77361847f8eSopenharmony_ci written: number; 77461847f8eSopenharmony_ci } 77561847f8eSopenharmony_ci 77661847f8eSopenharmony_ci /** 77761847f8eSopenharmony_ci * The TextEncoder interface represents a text encoder. 77861847f8eSopenharmony_ci * The encoder takes the byte stream as the input and outputs the String string. 77961847f8eSopenharmony_ci * 78061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 78161847f8eSopenharmony_ci * @since 7 78261847f8eSopenharmony_ci */ 78361847f8eSopenharmony_ci /** 78461847f8eSopenharmony_ci * The TextEncoder interface represents a text encoder. 78561847f8eSopenharmony_ci * The encoder takes the byte stream as the input and outputs the String string. 78661847f8eSopenharmony_ci * 78761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 78861847f8eSopenharmony_ci * @crossplatform 78961847f8eSopenharmony_ci * @since 10 79061847f8eSopenharmony_ci */ 79161847f8eSopenharmony_ci /** 79261847f8eSopenharmony_ci * The TextEncoder interface represents a text encoder. 79361847f8eSopenharmony_ci * The encoder takes the byte stream as the input and outputs the String string. 79461847f8eSopenharmony_ci * 79561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 79661847f8eSopenharmony_ci * @crossplatform 79761847f8eSopenharmony_ci * @atomicservice 79861847f8eSopenharmony_ci * @since 11 79961847f8eSopenharmony_ci */ 80061847f8eSopenharmony_ci class TextEncoder { 80161847f8eSopenharmony_ci /** 80261847f8eSopenharmony_ci * Encoding format. 80361847f8eSopenharmony_ci * 80461847f8eSopenharmony_ci * @type { 'utf-8' } 80561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 80661847f8eSopenharmony_ci * @since 7 80761847f8eSopenharmony_ci */ 80861847f8eSopenharmony_ci /** 80961847f8eSopenharmony_ci * Encoding format. 81061847f8eSopenharmony_ci * 81161847f8eSopenharmony_ci * @type { 'utf-8' } 81261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 81361847f8eSopenharmony_ci * @crossplatform 81461847f8eSopenharmony_ci * @since 10 81561847f8eSopenharmony_ci */ 81661847f8eSopenharmony_ci /** 81761847f8eSopenharmony_ci * Encoding format. 81861847f8eSopenharmony_ci * 81961847f8eSopenharmony_ci * @type { 'utf-8' } 82061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 82161847f8eSopenharmony_ci * @crossplatform 82261847f8eSopenharmony_ci * @atomicservice 82361847f8eSopenharmony_ci * @since 12 82461847f8eSopenharmony_ci */ 82561847f8eSopenharmony_ci readonly encoding = 'utf-8'; 82661847f8eSopenharmony_ci 82761847f8eSopenharmony_ci /** 82861847f8eSopenharmony_ci * The textEncoder constructor. 82961847f8eSopenharmony_ci * 83061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 83161847f8eSopenharmony_ci * @since 7 83261847f8eSopenharmony_ci */ 83361847f8eSopenharmony_ci /** 83461847f8eSopenharmony_ci * The textEncoder constructor. 83561847f8eSopenharmony_ci * 83661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 83761847f8eSopenharmony_ci * @crossplatform 83861847f8eSopenharmony_ci * @since 10 83961847f8eSopenharmony_ci */ 84061847f8eSopenharmony_ci /** 84161847f8eSopenharmony_ci * The textEncoder constructor. 84261847f8eSopenharmony_ci * 84361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 84461847f8eSopenharmony_ci * @crossplatform 84561847f8eSopenharmony_ci * @atomicservice 84661847f8eSopenharmony_ci * @since 11 84761847f8eSopenharmony_ci */ 84861847f8eSopenharmony_ci constructor(); 84961847f8eSopenharmony_ci 85061847f8eSopenharmony_ci /** 85161847f8eSopenharmony_ci * The textEncoder constructor. 85261847f8eSopenharmony_ci * 85361847f8eSopenharmony_ci * @param { string } [encoding] - The string for encoding format. 85461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 85561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 85661847f8eSopenharmony_ci * @since 9 85761847f8eSopenharmony_ci */ 85861847f8eSopenharmony_ci /** 85961847f8eSopenharmony_ci * The textEncoder constructor. 86061847f8eSopenharmony_ci * 86161847f8eSopenharmony_ci * @param { string } [encoding] - The string for encoding format. 86261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 86361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 86461847f8eSopenharmony_ci * @crossplatform 86561847f8eSopenharmony_ci * @since 10 86661847f8eSopenharmony_ci */ 86761847f8eSopenharmony_ci /** 86861847f8eSopenharmony_ci * The textEncoder constructor. 86961847f8eSopenharmony_ci * 87061847f8eSopenharmony_ci * @param { string } [encoding] - The string for encoding format. 87161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 87261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 87361847f8eSopenharmony_ci * @crossplatform 87461847f8eSopenharmony_ci * @atomicservice 87561847f8eSopenharmony_ci * @since 11 87661847f8eSopenharmony_ci */ 87761847f8eSopenharmony_ci constructor(encoding?: string); 87861847f8eSopenharmony_ci 87961847f8eSopenharmony_ci /** 88061847f8eSopenharmony_ci * Create a TextEncoder object. 88161847f8eSopenharmony_ci * 88261847f8eSopenharmony_ci * @param { string } [encoding] - The string for encoding format. 88361847f8eSopenharmony_ci * @returns { TextEncoder } 88461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 88561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 88661847f8eSopenharmony_ci * @crossplatform 88761847f8eSopenharmony_ci * @atomicservice 88861847f8eSopenharmony_ci * @since 12 88961847f8eSopenharmony_ci */ 89061847f8eSopenharmony_ci static create(encoding?: string): TextEncoder; 89161847f8eSopenharmony_ci 89261847f8eSopenharmony_ci /** 89361847f8eSopenharmony_ci * Returns the result of encoder. 89461847f8eSopenharmony_ci * 89561847f8eSopenharmony_ci * @param { string } [input] - The string to be encoded. 89661847f8eSopenharmony_ci * @returns { Uint8Array } Returns the encoded text. 89761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 89861847f8eSopenharmony_ci * @since 7 89961847f8eSopenharmony_ci * @deprecated since 9 90061847f8eSopenharmony_ci * @useinstead ohos.util.encodeInto 90161847f8eSopenharmony_ci */ 90261847f8eSopenharmony_ci encode(input?: string): Uint8Array; 90361847f8eSopenharmony_ci 90461847f8eSopenharmony_ci /** 90561847f8eSopenharmony_ci * UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes. 90661847f8eSopenharmony_ci * 90761847f8eSopenharmony_ci * @param { string } [input] - The string to be encoded. 90861847f8eSopenharmony_ci * @returns { Uint8Array } Returns the encoded text. 90961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 91061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 91161847f8eSopenharmony_ci * @since 9 91261847f8eSopenharmony_ci */ 91361847f8eSopenharmony_ci /** 91461847f8eSopenharmony_ci * UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes. 91561847f8eSopenharmony_ci * 91661847f8eSopenharmony_ci * @param { string } [input] - The string to be encoded. 91761847f8eSopenharmony_ci * @returns { Uint8Array } Returns the encoded text. 91861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 91961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 92061847f8eSopenharmony_ci * @crossplatform 92161847f8eSopenharmony_ci * @since 10 92261847f8eSopenharmony_ci */ 92361847f8eSopenharmony_ci /** 92461847f8eSopenharmony_ci * UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes. 92561847f8eSopenharmony_ci * 92661847f8eSopenharmony_ci * @param { string } [input] - The string to be encoded. 92761847f8eSopenharmony_ci * @returns { Uint8Array } Returns the encoded text. 92861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 92961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 93061847f8eSopenharmony_ci * @crossplatform 93161847f8eSopenharmony_ci * @atomicservice 93261847f8eSopenharmony_ci * @since 11 93361847f8eSopenharmony_ci */ 93461847f8eSopenharmony_ci encodeInto(input?: string): Uint8Array; 93561847f8eSopenharmony_ci 93661847f8eSopenharmony_ci /** 93761847f8eSopenharmony_ci * Encode string, write the result to dest array. 93861847f8eSopenharmony_ci * 93961847f8eSopenharmony_ci * @param { string } input - The string to be encoded. 94061847f8eSopenharmony_ci * @param { Uint8Array } dest - Encoded numbers in accordance with the format 94161847f8eSopenharmony_ci * @returns { object } Return the object, where read represents 94261847f8eSopenharmony_ci * the number of characters that have been encoded, and written 94361847f8eSopenharmony_ci * represents the number of bytes occupied by the encoded characters. 94461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 94561847f8eSopenharmony_ci * @since 7 94661847f8eSopenharmony_ci * @deprecated since 9 94761847f8eSopenharmony_ci * @useinstead ohos.util.encodeIntoUint8Array 94861847f8eSopenharmony_ci */ 94961847f8eSopenharmony_ci encodeInto(input: string, dest: Uint8Array): { read: number; written: number }; 95061847f8eSopenharmony_ci 95161847f8eSopenharmony_ci /** 95261847f8eSopenharmony_ci * Encode string, write the result to dest array. 95361847f8eSopenharmony_ci * 95461847f8eSopenharmony_ci * @param { string } input - The string to be encoded. 95561847f8eSopenharmony_ci * @param { Uint8Array } dest - Encoded numbers in accordance with the format 95661847f8eSopenharmony_ci * @returns { object } Return the object, where read represents 95761847f8eSopenharmony_ci * the number of characters that have been encoded, and written 95861847f8eSopenharmony_ci * represents the number of bytes occupied by the encoded characters. 95961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 96061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 96161847f8eSopenharmony_ci * 2.Incorrect parameter types. 96261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 96361847f8eSopenharmony_ci * @since 9 96461847f8eSopenharmony_ci */ 96561847f8eSopenharmony_ci /** 96661847f8eSopenharmony_ci * Encode string, write the result to dest array. 96761847f8eSopenharmony_ci * 96861847f8eSopenharmony_ci * @param { string } input - The string to be encoded. 96961847f8eSopenharmony_ci * @param { Uint8Array } dest - Encoded numbers in accordance with the format 97061847f8eSopenharmony_ci * @returns { object } Return the object, where read represents 97161847f8eSopenharmony_ci * the number of characters that have been encoded, and written 97261847f8eSopenharmony_ci * represents the number of bytes occupied by the encoded characters. 97361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 97461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 97561847f8eSopenharmony_ci * 2.Incorrect parameter types. 97661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 97761847f8eSopenharmony_ci * @crossplatform 97861847f8eSopenharmony_ci * @since 10 97961847f8eSopenharmony_ci */ 98061847f8eSopenharmony_ci /** 98161847f8eSopenharmony_ci * Encode string, write the result to dest array. 98261847f8eSopenharmony_ci * 98361847f8eSopenharmony_ci * @param { string } input - The string to be encoded. 98461847f8eSopenharmony_ci * @param { Uint8Array } dest - Encoded numbers in accordance with the format 98561847f8eSopenharmony_ci * @returns { EncodeIntoUint8ArrayInfo } Return the object, where read represents 98661847f8eSopenharmony_ci * the number of characters that have been encoded, and written 98761847f8eSopenharmony_ci * represents the number of bytes occupied by the encoded characters. 98861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 98961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 99061847f8eSopenharmony_ci * 2.Incorrect parameter types. 99161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 99261847f8eSopenharmony_ci * @crossplatform 99361847f8eSopenharmony_ci * @atomicservice 99461847f8eSopenharmony_ci * @since 11 99561847f8eSopenharmony_ci */ 99661847f8eSopenharmony_ci encodeIntoUint8Array(input: string, dest: Uint8Array): EncodeIntoUint8ArrayInfo; 99761847f8eSopenharmony_ci } 99861847f8eSopenharmony_ci 99961847f8eSopenharmony_ci /** 100061847f8eSopenharmony_ci * The rational number is mainly to compare rational numbers and obtain the numerator and denominator. 100161847f8eSopenharmony_ci * 100261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 100361847f8eSopenharmony_ci * @since 8 100461847f8eSopenharmony_ci */ 100561847f8eSopenharmony_ci /** 100661847f8eSopenharmony_ci * The rational number is mainly to compare rational numbers and obtain the numerator and denominator. 100761847f8eSopenharmony_ci * 100861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 100961847f8eSopenharmony_ci * @crossplatform 101061847f8eSopenharmony_ci * @since 10 101161847f8eSopenharmony_ci */ 101261847f8eSopenharmony_ci /** 101361847f8eSopenharmony_ci * The rational number is mainly to compare rational numbers and obtain the numerator and denominator. 101461847f8eSopenharmony_ci * 101561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 101661847f8eSopenharmony_ci * @crossplatform 101761847f8eSopenharmony_ci * @atomicservice 101861847f8eSopenharmony_ci * @since 12 101961847f8eSopenharmony_ci */ 102061847f8eSopenharmony_ci class RationalNumber { 102161847f8eSopenharmony_ci /** 102261847f8eSopenharmony_ci * A constructor used to create a RationalNumber instance with a given numerator and denominator. 102361847f8eSopenharmony_ci * 102461847f8eSopenharmony_ci * @param { number } numerator - An integer number 102561847f8eSopenharmony_ci * @param { number } denominator - An integer number 102661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 102761847f8eSopenharmony_ci * @since 8 102861847f8eSopenharmony_ci * @deprecated since 9 102961847f8eSopenharmony_ci * @useinstead ohos.util.RationalNumber.parseRationalNumber 103061847f8eSopenharmony_ci */ 103161847f8eSopenharmony_ci constructor(numerator: number, denominator: number); 103261847f8eSopenharmony_ci 103361847f8eSopenharmony_ci /** 103461847f8eSopenharmony_ci * A constructor used to create a RationalNumber instance with a given numerator and denominator. 103561847f8eSopenharmony_ci * 103661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 103761847f8eSopenharmony_ci * @since 9 103861847f8eSopenharmony_ci */ 103961847f8eSopenharmony_ci /** 104061847f8eSopenharmony_ci * A constructor used to create a RationalNumber instance with a given numerator and denominator. 104161847f8eSopenharmony_ci * 104261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 104361847f8eSopenharmony_ci * @crossplatform 104461847f8eSopenharmony_ci * @since 10 104561847f8eSopenharmony_ci */ 104661847f8eSopenharmony_ci /** 104761847f8eSopenharmony_ci * A constructor used to create a RationalNumber instance with a given numerator and denominator. 104861847f8eSopenharmony_ci * 104961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 105061847f8eSopenharmony_ci * @crossplatform 105161847f8eSopenharmony_ci * @atomicservice 105261847f8eSopenharmony_ci * @since 12 105361847f8eSopenharmony_ci */ 105461847f8eSopenharmony_ci constructor(); 105561847f8eSopenharmony_ci 105661847f8eSopenharmony_ci /** 105761847f8eSopenharmony_ci * Used to create a RationalNumber instance with a given numerator and denominator. 105861847f8eSopenharmony_ci * 105961847f8eSopenharmony_ci * @param { number } numerator - An integer number 106061847f8eSopenharmony_ci * @param { number } denominator - An integer number 106161847f8eSopenharmony_ci * @returns { RationalNumber } 106261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 106361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 106461847f8eSopenharmony_ci * 2.Incorrect parameter types. 106561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 106661847f8eSopenharmony_ci * @since 9 106761847f8eSopenharmony_ci */ 106861847f8eSopenharmony_ci /** 106961847f8eSopenharmony_ci * Used to create a RationalNumber instance with a given numerator and denominator. 107061847f8eSopenharmony_ci * 107161847f8eSopenharmony_ci * @param { number } numerator - An integer number 107261847f8eSopenharmony_ci * @param { number } denominator - An integer number 107361847f8eSopenharmony_ci * @returns { RationalNumber } 107461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 107561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 107661847f8eSopenharmony_ci * 2.Incorrect parameter types. 107761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 107861847f8eSopenharmony_ci * @crossplatform 107961847f8eSopenharmony_ci * @since 10 108061847f8eSopenharmony_ci */ 108161847f8eSopenharmony_ci /** 108261847f8eSopenharmony_ci * Used to create a RationalNumber instance with a given numerator and denominator. 108361847f8eSopenharmony_ci * 108461847f8eSopenharmony_ci * @param { number } numerator - An integer number 108561847f8eSopenharmony_ci * @param { number } denominator - An integer number 108661847f8eSopenharmony_ci * @returns { RationalNumber } 108761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 108861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 108961847f8eSopenharmony_ci * 2.Incorrect parameter types. 109061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 109161847f8eSopenharmony_ci * @crossplatform 109261847f8eSopenharmony_ci * @atomicservice 109361847f8eSopenharmony_ci * @since 12 109461847f8eSopenharmony_ci */ 109561847f8eSopenharmony_ci static parseRationalNumber(numerator: number, denominator: number): RationalNumber; 109661847f8eSopenharmony_ci 109761847f8eSopenharmony_ci /** 109861847f8eSopenharmony_ci * Creates a RationalNumber object based on a given string. 109961847f8eSopenharmony_ci * 110061847f8eSopenharmony_ci * @param { string } rationalString - String Expression of Rational Numbers 110161847f8eSopenharmony_ci * @returns { RationalNumber } Returns a RationalNumber object generated based on the given string. 110261847f8eSopenharmony_ci * @throws { BusinessError } 401 - The type of rationalString must be string. 110361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 110461847f8eSopenharmony_ci * @since 8 110561847f8eSopenharmony_ci */ 110661847f8eSopenharmony_ci /** 110761847f8eSopenharmony_ci * Creates a RationalNumber object based on a given string. 110861847f8eSopenharmony_ci * 110961847f8eSopenharmony_ci * @param { string } rationalString - String Expression of Rational Numbers 111061847f8eSopenharmony_ci * @returns { RationalNumber } Returns a RationalNumber object generated based on the given string. 111161847f8eSopenharmony_ci * @throws { BusinessError } 401 - The type of rationalString must be string. 111261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 111361847f8eSopenharmony_ci * @crossplatform 111461847f8eSopenharmony_ci * @since 10 111561847f8eSopenharmony_ci */ 111661847f8eSopenharmony_ci /** 111761847f8eSopenharmony_ci * Creates a RationalNumber object based on a given string. 111861847f8eSopenharmony_ci * 111961847f8eSopenharmony_ci * @param { string } rationalString - String Expression of Rational Numbers 112061847f8eSopenharmony_ci * @returns { RationalNumber } Returns a RationalNumber object generated based on the given string. 112161847f8eSopenharmony_ci * @throws { BusinessError } 401 - The type of rationalString must be string. 112261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 112361847f8eSopenharmony_ci * @crossplatform 112461847f8eSopenharmony_ci * @atomicservice 112561847f8eSopenharmony_ci * @since 12 112661847f8eSopenharmony_ci */ 112761847f8eSopenharmony_ci static createRationalFromString(rationalString: string): RationalNumber; 112861847f8eSopenharmony_ci 112961847f8eSopenharmony_ci /** 113061847f8eSopenharmony_ci * Compares the current RationalNumber object to the given object. 113161847f8eSopenharmony_ci * 113261847f8eSopenharmony_ci * @param { RationalNumber } another - An object of other rational numbers 113361847f8eSopenharmony_ci * @returns { number } Returns 0 or 1, or -1, depending on the comparison. 113461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 113561847f8eSopenharmony_ci * @since 8 113661847f8eSopenharmony_ci * @deprecated since 9 113761847f8eSopenharmony_ci * @useinstead ohos.util.compare 113861847f8eSopenharmony_ci */ 113961847f8eSopenharmony_ci compareTo(another: RationalNumber): number; 114061847f8eSopenharmony_ci 114161847f8eSopenharmony_ci /** 114261847f8eSopenharmony_ci * Compares the current RationalNumber object to the given object. 114361847f8eSopenharmony_ci * 114461847f8eSopenharmony_ci * @param { RationalNumber } another - An object of other rational numbers 114561847f8eSopenharmony_ci * @returns { number } Returns 0 or 1, or -1, depending on the comparison. 114661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 114761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 114861847f8eSopenharmony_ci * 2.Incorrect parameter types. 114961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 115061847f8eSopenharmony_ci * @since 9 115161847f8eSopenharmony_ci */ 115261847f8eSopenharmony_ci /** 115361847f8eSopenharmony_ci * Compares the current RationalNumber object to the given object. 115461847f8eSopenharmony_ci * 115561847f8eSopenharmony_ci * @param { RationalNumber } another - An object of other rational numbers 115661847f8eSopenharmony_ci * @returns { number } Returns 0 or 1, or -1, depending on the comparison. 115761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 115861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 115961847f8eSopenharmony_ci * 2.Incorrect parameter types. 116061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 116161847f8eSopenharmony_ci * @crossplatform 116261847f8eSopenharmony_ci * @since 10 116361847f8eSopenharmony_ci */ 116461847f8eSopenharmony_ci /** 116561847f8eSopenharmony_ci * Compares the current RationalNumber object to the given object. 116661847f8eSopenharmony_ci * 116761847f8eSopenharmony_ci * @param { RationalNumber } another - An object of other rational numbers 116861847f8eSopenharmony_ci * @returns { number } Returns 0 or 1, or -1, depending on the comparison. 116961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 117061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 117161847f8eSopenharmony_ci * 2.Incorrect parameter types. 117261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 117361847f8eSopenharmony_ci * @crossplatform 117461847f8eSopenharmony_ci * @atomicservice 117561847f8eSopenharmony_ci * @since 12 117661847f8eSopenharmony_ci */ 117761847f8eSopenharmony_ci compare(another: RationalNumber): number; 117861847f8eSopenharmony_ci 117961847f8eSopenharmony_ci /** 118061847f8eSopenharmony_ci * Compares two objects for equality. 118161847f8eSopenharmony_ci * 118261847f8eSopenharmony_ci * @param { Object } obj - An object 118361847f8eSopenharmony_ci * @returns { boolean } Returns true if the given object is the same as the current object; Otherwise, false is returned. 118461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 118561847f8eSopenharmony_ci * @since 8 118661847f8eSopenharmony_ci */ 118761847f8eSopenharmony_ci /** 118861847f8eSopenharmony_ci * Compares two objects for equality. 118961847f8eSopenharmony_ci * 119061847f8eSopenharmony_ci * @param { Object } obj - An object 119161847f8eSopenharmony_ci * @returns { boolean } Returns true if the given object is the same as the current object; Otherwise, false is returned. 119261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 119361847f8eSopenharmony_ci * @crossplatform 119461847f8eSopenharmony_ci * @since 10 119561847f8eSopenharmony_ci */ 119661847f8eSopenharmony_ci /** 119761847f8eSopenharmony_ci * Compares two objects for equality. 119861847f8eSopenharmony_ci * 119961847f8eSopenharmony_ci * @param { Object } obj - An object 120061847f8eSopenharmony_ci * @returns { boolean } Returns true if the given object is the same as the current object; Otherwise, false is returned. 120161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 120261847f8eSopenharmony_ci * @crossplatform 120361847f8eSopenharmony_ci * @atomicservice 120461847f8eSopenharmony_ci * @since 12 120561847f8eSopenharmony_ci */ 120661847f8eSopenharmony_ci equals(obj: Object): boolean; 120761847f8eSopenharmony_ci 120861847f8eSopenharmony_ci /** 120961847f8eSopenharmony_ci * Gets integer and floating-point values of a rational number object. 121061847f8eSopenharmony_ci * 121161847f8eSopenharmony_ci * @returns { number } Returns the integer and floating-point values of a rational number object. 121261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 121361847f8eSopenharmony_ci * @since 8 121461847f8eSopenharmony_ci */ 121561847f8eSopenharmony_ci /** 121661847f8eSopenharmony_ci * Gets integer and floating-point values of a rational number object. 121761847f8eSopenharmony_ci * 121861847f8eSopenharmony_ci * @returns { number } Returns the integer and floating-point values of a rational number object. 121961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 122061847f8eSopenharmony_ci * @crossplatform 122161847f8eSopenharmony_ci * @since 10 122261847f8eSopenharmony_ci */ 122361847f8eSopenharmony_ci /** 122461847f8eSopenharmony_ci * Gets integer and floating-point values of a rational number object. 122561847f8eSopenharmony_ci * 122661847f8eSopenharmony_ci * @returns { number } Returns the integer and floating-point values of a rational number object. 122761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 122861847f8eSopenharmony_ci * @crossplatform 122961847f8eSopenharmony_ci * @atomicservice 123061847f8eSopenharmony_ci * @since 12 123161847f8eSopenharmony_ci */ 123261847f8eSopenharmony_ci valueOf(): number; 123361847f8eSopenharmony_ci 123461847f8eSopenharmony_ci /** 123561847f8eSopenharmony_ci * Get the greatest common divisor of two integers. 123661847f8eSopenharmony_ci * 123761847f8eSopenharmony_ci * @param { number } number1 - Is an integer. 123861847f8eSopenharmony_ci * @param { number } number2 - Is an integer. 123961847f8eSopenharmony_ci * @returns { number } Returns the greatest common divisor of two integers, integer type. 124061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 124161847f8eSopenharmony_ci * @since 8 124261847f8eSopenharmony_ci * @deprecated since 9 124361847f8eSopenharmony_ci * @useinstead ohos.util.getCommonFactor 124461847f8eSopenharmony_ci */ 124561847f8eSopenharmony_ci static getCommonDivisor(number1: number, number2: number): number; 124661847f8eSopenharmony_ci 124761847f8eSopenharmony_ci /** 124861847f8eSopenharmony_ci * Get the greatest common factor of two integers. 124961847f8eSopenharmony_ci * 125061847f8eSopenharmony_ci * @param { number } number1 - Is an integer. 125161847f8eSopenharmony_ci * @param { number } number2 - Is an integer. 125261847f8eSopenharmony_ci * @returns { number } Returns the greatest common factor of two integers, integer type. 125361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 125461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 125561847f8eSopenharmony_ci * 2.Incorrect parameter types. 125661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 125761847f8eSopenharmony_ci * @since 9 125861847f8eSopenharmony_ci */ 125961847f8eSopenharmony_ci /** 126061847f8eSopenharmony_ci * Get the greatest common factor of two integers. 126161847f8eSopenharmony_ci * 126261847f8eSopenharmony_ci * @param { number } number1 - Is an integer. 126361847f8eSopenharmony_ci * @param { number } number2 - Is an integer. 126461847f8eSopenharmony_ci * @returns { number } Returns the greatest common factor of two integers, integer type. 126561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 126661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 126761847f8eSopenharmony_ci * 2.Incorrect parameter types. 126861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 126961847f8eSopenharmony_ci * @crossplatform 127061847f8eSopenharmony_ci * @since 10 127161847f8eSopenharmony_ci */ 127261847f8eSopenharmony_ci /** 127361847f8eSopenharmony_ci * Get the greatest common factor of two integers. 127461847f8eSopenharmony_ci * 127561847f8eSopenharmony_ci * @param { number } number1 - Is an integer. 127661847f8eSopenharmony_ci * @param { number } number2 - Is an integer. 127761847f8eSopenharmony_ci * @returns { number } Returns the greatest common factor of two integers, integer type. 127861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 127961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 128061847f8eSopenharmony_ci * 2.Incorrect parameter types. 128161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 128261847f8eSopenharmony_ci * @crossplatform 128361847f8eSopenharmony_ci * @atomicservice 128461847f8eSopenharmony_ci * @since 12 128561847f8eSopenharmony_ci */ 128661847f8eSopenharmony_ci static getCommonFactor(number1: number, number2: number): number; 128761847f8eSopenharmony_ci 128861847f8eSopenharmony_ci /** 128961847f8eSopenharmony_ci * Gets the denominator of the current object. 129061847f8eSopenharmony_ci * 129161847f8eSopenharmony_ci * @returns { number } Returns the denominator of the current object. 129261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 129361847f8eSopenharmony_ci * @since 8 129461847f8eSopenharmony_ci */ 129561847f8eSopenharmony_ci /** 129661847f8eSopenharmony_ci * Gets the denominator of the current object. 129761847f8eSopenharmony_ci * 129861847f8eSopenharmony_ci * @returns { number } Returns the denominator of the current object. 129961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 130061847f8eSopenharmony_ci * @crossplatform 130161847f8eSopenharmony_ci * @since 10 130261847f8eSopenharmony_ci */ 130361847f8eSopenharmony_ci /** 130461847f8eSopenharmony_ci * Gets the denominator of the current object. 130561847f8eSopenharmony_ci * 130661847f8eSopenharmony_ci * @returns { number } Returns the denominator of the current object. 130761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 130861847f8eSopenharmony_ci * @crossplatform 130961847f8eSopenharmony_ci * @atomicservice 131061847f8eSopenharmony_ci * @since 12 131161847f8eSopenharmony_ci */ 131261847f8eSopenharmony_ci getDenominator(): number; 131361847f8eSopenharmony_ci 131461847f8eSopenharmony_ci /** 131561847f8eSopenharmony_ci * Gets the numerator of the current object. 131661847f8eSopenharmony_ci * 131761847f8eSopenharmony_ci * @returns { number } Returns the numerator of the current object. 131861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 131961847f8eSopenharmony_ci * @since 8 132061847f8eSopenharmony_ci */ 132161847f8eSopenharmony_ci /** 132261847f8eSopenharmony_ci * Gets the numerator of the current object. 132361847f8eSopenharmony_ci * 132461847f8eSopenharmony_ci * @returns { number } Returns the numerator of the current object. 132561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 132661847f8eSopenharmony_ci * @crossplatform 132761847f8eSopenharmony_ci * @since 10 132861847f8eSopenharmony_ci */ 132961847f8eSopenharmony_ci /** 133061847f8eSopenharmony_ci * Gets the numerator of the current object. 133161847f8eSopenharmony_ci * 133261847f8eSopenharmony_ci * @returns { number } Returns the numerator of the current object. 133361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 133461847f8eSopenharmony_ci * @crossplatform 133561847f8eSopenharmony_ci * @atomicservice 133661847f8eSopenharmony_ci * @since 12 133761847f8eSopenharmony_ci */ 133861847f8eSopenharmony_ci getNumerator(): number; 133961847f8eSopenharmony_ci 134061847f8eSopenharmony_ci /** 134161847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents an infinite value. 134261847f8eSopenharmony_ci * 134361847f8eSopenharmony_ci * @returns { boolean } If the denominator is not 0, true is returned. Otherwise, false is returned. 134461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 134561847f8eSopenharmony_ci * @since 8 134661847f8eSopenharmony_ci */ 134761847f8eSopenharmony_ci /** 134861847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents an infinite value. 134961847f8eSopenharmony_ci * 135061847f8eSopenharmony_ci * @returns { boolean } If the denominator is not 0, true is returned. Otherwise, false is returned. 135161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 135261847f8eSopenharmony_ci * @crossplatform 135361847f8eSopenharmony_ci * @since 10 135461847f8eSopenharmony_ci */ 135561847f8eSopenharmony_ci /** 135661847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents an infinite value. 135761847f8eSopenharmony_ci * 135861847f8eSopenharmony_ci * @returns { boolean } If the denominator is not 0, true is returned. Otherwise, false is returned. 135961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 136061847f8eSopenharmony_ci * @crossplatform 136161847f8eSopenharmony_ci * @atomicservice 136261847f8eSopenharmony_ci * @since 12 136361847f8eSopenharmony_ci */ 136461847f8eSopenharmony_ci isFinite(): boolean; 136561847f8eSopenharmony_ci 136661847f8eSopenharmony_ci /** 136761847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. 136861847f8eSopenharmony_ci * 136961847f8eSopenharmony_ci * @returns { boolean } If both the denominator and numerator are 0, true is returned. Otherwise, false is returned. 137061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 137161847f8eSopenharmony_ci * @since 8 137261847f8eSopenharmony_ci */ 137361847f8eSopenharmony_ci /** 137461847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. 137561847f8eSopenharmony_ci * 137661847f8eSopenharmony_ci * @returns { boolean } If both the denominator and numerator are 0, true is returned. Otherwise, false is returned. 137761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 137861847f8eSopenharmony_ci * @crossplatform 137961847f8eSopenharmony_ci * @since 10 138061847f8eSopenharmony_ci */ 138161847f8eSopenharmony_ci /** 138261847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. 138361847f8eSopenharmony_ci * 138461847f8eSopenharmony_ci * @returns { boolean } If both the denominator and numerator are 0, true is returned. Otherwise, false is returned. 138561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 138661847f8eSopenharmony_ci * @crossplatform 138761847f8eSopenharmony_ci * @atomicservice 138861847f8eSopenharmony_ci * @since 12 138961847f8eSopenharmony_ci */ 139061847f8eSopenharmony_ci isNaN(): boolean; 139161847f8eSopenharmony_ci 139261847f8eSopenharmony_ci /** 139361847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents the value 0. 139461847f8eSopenharmony_ci * 139561847f8eSopenharmony_ci * @returns { boolean } If the value represented by the current object is 0, true is returned. Otherwise, false is returned. 139661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 139761847f8eSopenharmony_ci * @since 8 139861847f8eSopenharmony_ci */ 139961847f8eSopenharmony_ci /** 140061847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents the value 0. 140161847f8eSopenharmony_ci * 140261847f8eSopenharmony_ci * @returns { boolean } If the value represented by the current object is 0, true is returned. Otherwise, false is returned. 140361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 140461847f8eSopenharmony_ci * @crossplatform 140561847f8eSopenharmony_ci * @since 10 140661847f8eSopenharmony_ci */ 140761847f8eSopenharmony_ci /** 140861847f8eSopenharmony_ci * Checks whether the current RationalNumber object represents the value 0. 140961847f8eSopenharmony_ci * 141061847f8eSopenharmony_ci * @returns { boolean } If the value represented by the current object is 0, true is returned. Otherwise, false is returned. 141161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 141261847f8eSopenharmony_ci * @crossplatform 141361847f8eSopenharmony_ci * @atomicservice 141461847f8eSopenharmony_ci * @since 12 141561847f8eSopenharmony_ci */ 141661847f8eSopenharmony_ci isZero(): boolean; 141761847f8eSopenharmony_ci 141861847f8eSopenharmony_ci /** 141961847f8eSopenharmony_ci * Obtains a string representation of the current RationalNumber object. 142061847f8eSopenharmony_ci * 142161847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current RationalNumber object. 142261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 142361847f8eSopenharmony_ci * @since 8 142461847f8eSopenharmony_ci */ 142561847f8eSopenharmony_ci /** 142661847f8eSopenharmony_ci * Obtains a string representation of the current RationalNumber object. 142761847f8eSopenharmony_ci * 142861847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current RationalNumber object. 142961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 143061847f8eSopenharmony_ci * @crossplatform 143161847f8eSopenharmony_ci * @since 10 143261847f8eSopenharmony_ci */ 143361847f8eSopenharmony_ci /** 143461847f8eSopenharmony_ci * Obtains a string representation of the current RationalNumber object. 143561847f8eSopenharmony_ci * 143661847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current RationalNumber object. 143761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 143861847f8eSopenharmony_ci * @crossplatform 143961847f8eSopenharmony_ci * @atomicservice 144061847f8eSopenharmony_ci * @since 12 144161847f8eSopenharmony_ci */ 144261847f8eSopenharmony_ci toString(): string; 144361847f8eSopenharmony_ci } 144461847f8eSopenharmony_ci 144561847f8eSopenharmony_ci /** 144661847f8eSopenharmony_ci * The LruBuffer algorithm replaces the least used data with new data when the buffer space is insufficient. 144761847f8eSopenharmony_ci * 144861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 144961847f8eSopenharmony_ci * @since 8 145061847f8eSopenharmony_ci * @deprecated since 9 145161847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache 145261847f8eSopenharmony_ci */ 145361847f8eSopenharmony_ci class LruBuffer<K, V> { 145461847f8eSopenharmony_ci /** 145561847f8eSopenharmony_ci * Default constructor used to create a new LruBuffer instance with the default capacity of 64. 145661847f8eSopenharmony_ci * 145761847f8eSopenharmony_ci * @param { number } capacity - Indicates the capacity to customize for the buffer. 145861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 145961847f8eSopenharmony_ci * @since 8 146061847f8eSopenharmony_ci * @deprecated since 9 146161847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.constructor 146261847f8eSopenharmony_ci */ 146361847f8eSopenharmony_ci constructor(capacity?: number); 146461847f8eSopenharmony_ci 146561847f8eSopenharmony_ci /** 146661847f8eSopenharmony_ci * Updates the buffer capacity to a specified capacity. 146761847f8eSopenharmony_ci * 146861847f8eSopenharmony_ci * @param { number } newCapacity - Indicates the new capacity to set. 146961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 147061847f8eSopenharmony_ci * @since 8 147161847f8eSopenharmony_ci * @deprecated since 9 147261847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.updateCapacity 147361847f8eSopenharmony_ci */ 147461847f8eSopenharmony_ci updateCapacity(newCapacity: number): void; 147561847f8eSopenharmony_ci 147661847f8eSopenharmony_ci /** 147761847f8eSopenharmony_ci * Returns a string representation of the object. 147861847f8eSopenharmony_ci * 147961847f8eSopenharmony_ci * @returns { string } Returns the string representation of the object and outputs the string representation of the object. 148061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 148161847f8eSopenharmony_ci * @since 8 148261847f8eSopenharmony_ci * @deprecated since 9 148361847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.toString 148461847f8eSopenharmony_ci */ 148561847f8eSopenharmony_ci toString(): string; 148661847f8eSopenharmony_ci 148761847f8eSopenharmony_ci /** 148861847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 148961847f8eSopenharmony_ci * 149061847f8eSopenharmony_ci * @type { number } 149161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 149261847f8eSopenharmony_ci * @since 8 149361847f8eSopenharmony_ci * @deprecated since 9 149461847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.length 149561847f8eSopenharmony_ci */ 149661847f8eSopenharmony_ci length: number; 149761847f8eSopenharmony_ci 149861847f8eSopenharmony_ci /** 149961847f8eSopenharmony_ci * Obtains the capacity of the current buffer. 150061847f8eSopenharmony_ci * 150161847f8eSopenharmony_ci * @returns { number } Returns the capacity of the current buffer. 150261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 150361847f8eSopenharmony_ci * @since 8 150461847f8eSopenharmony_ci * @deprecated since 9 150561847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.getCapacity 150661847f8eSopenharmony_ci */ 150761847f8eSopenharmony_ci getCapacity(): number; 150861847f8eSopenharmony_ci 150961847f8eSopenharmony_ci /** 151061847f8eSopenharmony_ci * Clears key-value pairs from the current buffer. 151161847f8eSopenharmony_ci * 151261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 151361847f8eSopenharmony_ci * @since 8 151461847f8eSopenharmony_ci * @deprecated since 9 151561847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.clear 151661847f8eSopenharmony_ci */ 151761847f8eSopenharmony_ci clear(): void; 151861847f8eSopenharmony_ci 151961847f8eSopenharmony_ci /** 152061847f8eSopenharmony_ci * Obtains the number of times createDefault(Object) returned a value. 152161847f8eSopenharmony_ci * 152261847f8eSopenharmony_ci * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value. 152361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 152461847f8eSopenharmony_ci * @since 8 152561847f8eSopenharmony_ci * @deprecated since 9 152661847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.getCreateCount 152761847f8eSopenharmony_ci */ 152861847f8eSopenharmony_ci getCreateCount(): number; 152961847f8eSopenharmony_ci 153061847f8eSopenharmony_ci /** 153161847f8eSopenharmony_ci * Obtains the number of times that the queried values are not matched. 153261847f8eSopenharmony_ci * 153361847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are not matched. 153461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 153561847f8eSopenharmony_ci * @since 8 153661847f8eSopenharmony_ci * @deprecated since 9 153761847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.getMissCount 153861847f8eSopenharmony_ci */ 153961847f8eSopenharmony_ci getMissCount(): number; 154061847f8eSopenharmony_ci 154161847f8eSopenharmony_ci /** 154261847f8eSopenharmony_ci * Obtains the number of times that values are evicted from the buffer. 154361847f8eSopenharmony_ci * 154461847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are evicted from the buffer. 154561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 154661847f8eSopenharmony_ci * @since 8 154761847f8eSopenharmony_ci * @deprecated since 9 154861847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.getRemovalCount 154961847f8eSopenharmony_ci */ 155061847f8eSopenharmony_ci getRemovalCount(): number; 155161847f8eSopenharmony_ci 155261847f8eSopenharmony_ci /** 155361847f8eSopenharmony_ci * Obtains the number of times that the queried values are successfully matched. 155461847f8eSopenharmony_ci * 155561847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are successfully matched. 155661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 155761847f8eSopenharmony_ci * @since 8 155861847f8eSopenharmony_ci * @deprecated since 9 155961847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.getMatchCount 156061847f8eSopenharmony_ci */ 156161847f8eSopenharmony_ci getMatchCount(): number; 156261847f8eSopenharmony_ci 156361847f8eSopenharmony_ci /** 156461847f8eSopenharmony_ci * Obtains the number of times that values are added to the buffer. 156561847f8eSopenharmony_ci * 156661847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are added to the buffer. 156761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 156861847f8eSopenharmony_ci * @since 8 156961847f8eSopenharmony_ci * @deprecated since 9 157061847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.getPutCount 157161847f8eSopenharmony_ci */ 157261847f8eSopenharmony_ci getPutCount(): number; 157361847f8eSopenharmony_ci 157461847f8eSopenharmony_ci /** 157561847f8eSopenharmony_ci * Checks whether the current buffer is empty. 157661847f8eSopenharmony_ci * 157761847f8eSopenharmony_ci * @returns { boolean } Returns true if the current buffer contains no value. 157861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 157961847f8eSopenharmony_ci * @since 8 158061847f8eSopenharmony_ci * @deprecated since 9 158161847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.isEmpty 158261847f8eSopenharmony_ci */ 158361847f8eSopenharmony_ci isEmpty(): boolean; 158461847f8eSopenharmony_ci 158561847f8eSopenharmony_ci /** 158661847f8eSopenharmony_ci * Obtains the value associated with a specified key. 158761847f8eSopenharmony_ci * 158861847f8eSopenharmony_ci * @param { K } key - Indicates the key to query. 158961847f8eSopenharmony_ci * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise. 159061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 159161847f8eSopenharmony_ci * @since 8 159261847f8eSopenharmony_ci * @deprecated since 9 159361847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.get 159461847f8eSopenharmony_ci */ 159561847f8eSopenharmony_ci get(key: K): V | undefined; 159661847f8eSopenharmony_ci 159761847f8eSopenharmony_ci /** 159861847f8eSopenharmony_ci * Adds a key-value pair to the buffer. 159961847f8eSopenharmony_ci * 160061847f8eSopenharmony_ci * @param { K } key - Indicates the key to add. 160161847f8eSopenharmony_ci * @param { V } value - Indicates the value associated with the key to add. 160261847f8eSopenharmony_ci * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists. 160361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 160461847f8eSopenharmony_ci * @since 8 160561847f8eSopenharmony_ci * @deprecated since 9 160661847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.put 160761847f8eSopenharmony_ci */ 160861847f8eSopenharmony_ci put(key: K, value: V): V; 160961847f8eSopenharmony_ci 161061847f8eSopenharmony_ci /** 161161847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 161261847f8eSopenharmony_ci * 161361847f8eSopenharmony_ci * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed. 161461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 161561847f8eSopenharmony_ci * @since 8 161661847f8eSopenharmony_ci * @deprecated since 9 161761847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.values 161861847f8eSopenharmony_ci */ 161961847f8eSopenharmony_ci values(): V[]; 162061847f8eSopenharmony_ci 162161847f8eSopenharmony_ci /** 162261847f8eSopenharmony_ci * Obtains a list of keys for the values in the current buffer. 162361847f8eSopenharmony_ci * 162461847f8eSopenharmony_ci * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed. 162561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 162661847f8eSopenharmony_ci * @since 8 162761847f8eSopenharmony_ci * @deprecated since 9 162861847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.keys 162961847f8eSopenharmony_ci */ 163061847f8eSopenharmony_ci keys(): K[]; 163161847f8eSopenharmony_ci 163261847f8eSopenharmony_ci /** 163361847f8eSopenharmony_ci * Deletes a specified key and its associated value from the current buffer. 163461847f8eSopenharmony_ci * 163561847f8eSopenharmony_ci * @param { K } key - Indicates the key to delete. 163661847f8eSopenharmony_ci * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist. 163761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 163861847f8eSopenharmony_ci * @since 8 163961847f8eSopenharmony_ci * @deprecated since 9 164061847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.remove 164161847f8eSopenharmony_ci */ 164261847f8eSopenharmony_ci remove(key: K): V | undefined; 164361847f8eSopenharmony_ci 164461847f8eSopenharmony_ci /** 164561847f8eSopenharmony_ci * Executes subsequent operations after a value is deleted. 164661847f8eSopenharmony_ci * 164761847f8eSopenharmony_ci * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity, 164861847f8eSopenharmony_ci * and the parameter value is false in other cases. 164961847f8eSopenharmony_ci * @param { K } key - Indicates the deleted key. 165061847f8eSopenharmony_ci * @param { V } value - Indicates the deleted value. 165161847f8eSopenharmony_ci * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object) 165261847f8eSopenharmony_ci * method is called and the key to add already exists. The parameter value is null in other cases. 165361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 165461847f8eSopenharmony_ci * @since 8 165561847f8eSopenharmony_ci * @deprecated since 9 165661847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.afterRemoval 165761847f8eSopenharmony_ci */ 165861847f8eSopenharmony_ci afterRemoval(isEvict: boolean, key: K, value: V, newValue: V): void; 165961847f8eSopenharmony_ci 166061847f8eSopenharmony_ci /** 166161847f8eSopenharmony_ci * Checks whether the current buffer contains a specified key. 166261847f8eSopenharmony_ci * 166361847f8eSopenharmony_ci * @param { K } key - Indicates the key to check. 166461847f8eSopenharmony_ci * @returns { boolean } Returns true if the buffer contains the specified key. 166561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 166661847f8eSopenharmony_ci * @since 8 166761847f8eSopenharmony_ci * @deprecated since 9 166861847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.contains 166961847f8eSopenharmony_ci */ 167061847f8eSopenharmony_ci contains(key: K): boolean; 167161847f8eSopenharmony_ci 167261847f8eSopenharmony_ci /** 167361847f8eSopenharmony_ci * Called after a cache miss to compute a value for the corresponding key. 167461847f8eSopenharmony_ci * 167561847f8eSopenharmony_ci * @param { K } key - Indicates the missed key. 167661847f8eSopenharmony_ci * @returns { V } Returns the value associated with the key. 167761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 167861847f8eSopenharmony_ci * @since 8 167961847f8eSopenharmony_ci * @deprecated since 9 168061847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.createDefault 168161847f8eSopenharmony_ci */ 168261847f8eSopenharmony_ci createDefault(key: K): V; 168361847f8eSopenharmony_ci 168461847f8eSopenharmony_ci /** 168561847f8eSopenharmony_ci * Returns an array of key-value pairs of enumeratable properties of a given object. 168661847f8eSopenharmony_ci * 168761847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself. 168861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 168961847f8eSopenharmony_ci * @since 8 169061847f8eSopenharmony_ci * @deprecated since 9 169161847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.entries 169261847f8eSopenharmony_ci */ 169361847f8eSopenharmony_ci entries(): IterableIterator<[K, V]>; 169461847f8eSopenharmony_ci 169561847f8eSopenharmony_ci /** 169661847f8eSopenharmony_ci * Specifies the default iterator for an object. 169761847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs. 169861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 169961847f8eSopenharmony_ci * @since 8 170061847f8eSopenharmony_ci * @deprecated since 9 170161847f8eSopenharmony_ci * @useinstead ohos.util.LRUCache.[Symbol.iterator] 170261847f8eSopenharmony_ci */ 170361847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<[K, V]>; 170461847f8eSopenharmony_ci } 170561847f8eSopenharmony_ci 170661847f8eSopenharmony_ci /** 170761847f8eSopenharmony_ci * The LRUCache algorithm replaces the least used data with new data when the buffer space is insufficient. 170861847f8eSopenharmony_ci * 170961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 171061847f8eSopenharmony_ci * @since 9 171161847f8eSopenharmony_ci */ 171261847f8eSopenharmony_ci /** 171361847f8eSopenharmony_ci * The LRUCache algorithm replaces the least used data with new data when the buffer space is insufficient. 171461847f8eSopenharmony_ci * 171561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 171661847f8eSopenharmony_ci * @crossplatform 171761847f8eSopenharmony_ci * @since 10 171861847f8eSopenharmony_ci */ 171961847f8eSopenharmony_ci /** 172061847f8eSopenharmony_ci * The LRUCache algorithm replaces the least used data with new data when the buffer space is insufficient. 172161847f8eSopenharmony_ci * 172261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 172361847f8eSopenharmony_ci * @crossplatform 172461847f8eSopenharmony_ci * @atomicservice 172561847f8eSopenharmony_ci * @since 12 172661847f8eSopenharmony_ci */ 172761847f8eSopenharmony_ci class LRUCache<K, V> { 172861847f8eSopenharmony_ci /** 172961847f8eSopenharmony_ci * Default constructor used to create a new LruBuffer instance with the default capacity of 64. 173061847f8eSopenharmony_ci * 173161847f8eSopenharmony_ci * @param { number } [capacity] - Indicates the capacity to customize for the buffer. 173261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 173361847f8eSopenharmony_ci * @since 9 173461847f8eSopenharmony_ci */ 173561847f8eSopenharmony_ci /** 173661847f8eSopenharmony_ci * Default constructor used to create a new LruBuffer instance with the default capacity of 64. 173761847f8eSopenharmony_ci * 173861847f8eSopenharmony_ci * @param { number } [capacity] - Indicates the capacity to customize for the buffer. 173961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 174061847f8eSopenharmony_ci * @crossplatform 174161847f8eSopenharmony_ci * @since 10 174261847f8eSopenharmony_ci */ 174361847f8eSopenharmony_ci /** 174461847f8eSopenharmony_ci * Default constructor used to create a new LruBuffer instance with the default capacity of 64. 174561847f8eSopenharmony_ci * 174661847f8eSopenharmony_ci * @param { number } [capacity] - Indicates the capacity to customize for the buffer. 174761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. 174861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 174961847f8eSopenharmony_ci * @crossplatform 175061847f8eSopenharmony_ci * @atomicservice 175161847f8eSopenharmony_ci * @since 12 175261847f8eSopenharmony_ci */ 175361847f8eSopenharmony_ci constructor(capacity?: number); 175461847f8eSopenharmony_ci 175561847f8eSopenharmony_ci /** 175661847f8eSopenharmony_ci * Updates the buffer capacity to a specified capacity. 175761847f8eSopenharmony_ci * 175861847f8eSopenharmony_ci * @param { number } newCapacity - Indicates the new capacity to set. 175961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 176061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 176161847f8eSopenharmony_ci * @since 9 176261847f8eSopenharmony_ci */ 176361847f8eSopenharmony_ci /** 176461847f8eSopenharmony_ci * Updates the buffer capacity to a specified capacity. 176561847f8eSopenharmony_ci * 176661847f8eSopenharmony_ci * @param { number } newCapacity - Indicates the new capacity to set. 176761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 176861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 176961847f8eSopenharmony_ci * @crossplatform 177061847f8eSopenharmony_ci * @since 10 177161847f8eSopenharmony_ci */ 177261847f8eSopenharmony_ci /** 177361847f8eSopenharmony_ci * Updates the buffer capacity to a specified capacity. 177461847f8eSopenharmony_ci * 177561847f8eSopenharmony_ci * @param { number } newCapacity - Indicates the new capacity to set. 177661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 177761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 177861847f8eSopenharmony_ci * @crossplatform 177961847f8eSopenharmony_ci * @atomicservice 178061847f8eSopenharmony_ci * @since 12 178161847f8eSopenharmony_ci */ 178261847f8eSopenharmony_ci updateCapacity(newCapacity: number): void; 178361847f8eSopenharmony_ci 178461847f8eSopenharmony_ci /** 178561847f8eSopenharmony_ci * Returns a string representation of the object. 178661847f8eSopenharmony_ci * 178761847f8eSopenharmony_ci * @returns { string } Returns the string representation of the object and outputs the string representation of the object. 178861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 178961847f8eSopenharmony_ci * @since 9 179061847f8eSopenharmony_ci */ 179161847f8eSopenharmony_ci /** 179261847f8eSopenharmony_ci * Returns a string representation of the object. 179361847f8eSopenharmony_ci * 179461847f8eSopenharmony_ci * @returns { string } Returns the string representation of the object and outputs the string representation of the object. 179561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 179661847f8eSopenharmony_ci * @crossplatform 179761847f8eSopenharmony_ci * @since 10 179861847f8eSopenharmony_ci */ 179961847f8eSopenharmony_ci /** 180061847f8eSopenharmony_ci * Returns a string representation of the object. 180161847f8eSopenharmony_ci * 180261847f8eSopenharmony_ci * @returns { string } Returns the string representation of the object and outputs the string representation of the object. 180361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 180461847f8eSopenharmony_ci * @crossplatform 180561847f8eSopenharmony_ci * @atomicservice 180661847f8eSopenharmony_ci * @since 12 180761847f8eSopenharmony_ci */ 180861847f8eSopenharmony_ci toString(): string; 180961847f8eSopenharmony_ci 181061847f8eSopenharmony_ci /** 181161847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 181261847f8eSopenharmony_ci * 181361847f8eSopenharmony_ci * @type { number } 181461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 181561847f8eSopenharmony_ci * @since 9 181661847f8eSopenharmony_ci */ 181761847f8eSopenharmony_ci /** 181861847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 181961847f8eSopenharmony_ci * 182061847f8eSopenharmony_ci * @type { number } 182161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 182261847f8eSopenharmony_ci * @crossplatform 182361847f8eSopenharmony_ci * @since 10 182461847f8eSopenharmony_ci */ 182561847f8eSopenharmony_ci /** 182661847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 182761847f8eSopenharmony_ci * 182861847f8eSopenharmony_ci * @type { number } 182961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 183061847f8eSopenharmony_ci * @crossplatform 183161847f8eSopenharmony_ci * @atomicservice 183261847f8eSopenharmony_ci * @since 12 183361847f8eSopenharmony_ci */ 183461847f8eSopenharmony_ci length: number; 183561847f8eSopenharmony_ci 183661847f8eSopenharmony_ci /** 183761847f8eSopenharmony_ci * Obtains the capacity of the current buffer. 183861847f8eSopenharmony_ci * 183961847f8eSopenharmony_ci * @returns { number } Returns the capacity of the current buffer. 184061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 184161847f8eSopenharmony_ci * @since 9 184261847f8eSopenharmony_ci */ 184361847f8eSopenharmony_ci /** 184461847f8eSopenharmony_ci * Obtains the capacity of the current buffer. 184561847f8eSopenharmony_ci * 184661847f8eSopenharmony_ci * @returns { number } Returns the capacity of the current buffer. 184761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 184861847f8eSopenharmony_ci * @crossplatform 184961847f8eSopenharmony_ci * @since 10 185061847f8eSopenharmony_ci */ 185161847f8eSopenharmony_ci /** 185261847f8eSopenharmony_ci * Obtains the capacity of the current buffer. 185361847f8eSopenharmony_ci * 185461847f8eSopenharmony_ci * @returns { number } Returns the capacity of the current buffer. 185561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 185661847f8eSopenharmony_ci * @crossplatform 185761847f8eSopenharmony_ci * @atomicservice 185861847f8eSopenharmony_ci * @since 12 185961847f8eSopenharmony_ci */ 186061847f8eSopenharmony_ci getCapacity(): number; 186161847f8eSopenharmony_ci 186261847f8eSopenharmony_ci /** 186361847f8eSopenharmony_ci * Clears key-value pairs from the current buffer. 186461847f8eSopenharmony_ci * 186561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 186661847f8eSopenharmony_ci * @since 9 186761847f8eSopenharmony_ci */ 186861847f8eSopenharmony_ci /** 186961847f8eSopenharmony_ci * Clears key-value pairs from the current buffer. 187061847f8eSopenharmony_ci * 187161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 187261847f8eSopenharmony_ci * @crossplatform 187361847f8eSopenharmony_ci * @since 10 187461847f8eSopenharmony_ci */ 187561847f8eSopenharmony_ci /** 187661847f8eSopenharmony_ci * Clears key-value pairs from the current buffer. 187761847f8eSopenharmony_ci * 187861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 187961847f8eSopenharmony_ci * @crossplatform 188061847f8eSopenharmony_ci * @atomicservice 188161847f8eSopenharmony_ci * @since 12 188261847f8eSopenharmony_ci */ 188361847f8eSopenharmony_ci clear(): void; 188461847f8eSopenharmony_ci 188561847f8eSopenharmony_ci /** 188661847f8eSopenharmony_ci * Obtains the number of times createDefault(Object) returned a value. 188761847f8eSopenharmony_ci * 188861847f8eSopenharmony_ci * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value. 188961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 189061847f8eSopenharmony_ci * @since 9 189161847f8eSopenharmony_ci */ 189261847f8eSopenharmony_ci /** 189361847f8eSopenharmony_ci * Obtains the number of times createDefault(Object) returned a value. 189461847f8eSopenharmony_ci * 189561847f8eSopenharmony_ci * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value. 189661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 189761847f8eSopenharmony_ci * @crossplatform 189861847f8eSopenharmony_ci * @since 10 189961847f8eSopenharmony_ci */ 190061847f8eSopenharmony_ci /** 190161847f8eSopenharmony_ci * Obtains the number of times createDefault(Object) returned a value. 190261847f8eSopenharmony_ci * 190361847f8eSopenharmony_ci * @returns { number } Returns the number of times createDefault(java.lang.Object) returned a value. 190461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 190561847f8eSopenharmony_ci * @crossplatform 190661847f8eSopenharmony_ci * @atomicservice 190761847f8eSopenharmony_ci * @since 12 190861847f8eSopenharmony_ci */ 190961847f8eSopenharmony_ci getCreateCount(): number; 191061847f8eSopenharmony_ci 191161847f8eSopenharmony_ci /** 191261847f8eSopenharmony_ci * Obtains the number of times that the queried values are not matched. 191361847f8eSopenharmony_ci * 191461847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are not matched. 191561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 191661847f8eSopenharmony_ci * @since 9 191761847f8eSopenharmony_ci */ 191861847f8eSopenharmony_ci /** 191961847f8eSopenharmony_ci * Obtains the number of times that the queried values are not matched. 192061847f8eSopenharmony_ci * 192161847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are not matched. 192261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 192361847f8eSopenharmony_ci * @crossplatform 192461847f8eSopenharmony_ci * @since 10 192561847f8eSopenharmony_ci */ 192661847f8eSopenharmony_ci /** 192761847f8eSopenharmony_ci * Obtains the number of times that the queried values are not matched. 192861847f8eSopenharmony_ci * 192961847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are not matched. 193061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 193161847f8eSopenharmony_ci * @crossplatform 193261847f8eSopenharmony_ci * @atomicservice 193361847f8eSopenharmony_ci * @since 12 193461847f8eSopenharmony_ci */ 193561847f8eSopenharmony_ci getMissCount(): number; 193661847f8eSopenharmony_ci 193761847f8eSopenharmony_ci /** 193861847f8eSopenharmony_ci * Obtains the number of times that values are evicted from the buffer. 193961847f8eSopenharmony_ci * 194061847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are evicted from the buffer. 194161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 194261847f8eSopenharmony_ci * @since 9 194361847f8eSopenharmony_ci */ 194461847f8eSopenharmony_ci /** 194561847f8eSopenharmony_ci * Obtains the number of times that values are evicted from the buffer. 194661847f8eSopenharmony_ci * 194761847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are evicted from the buffer. 194861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 194961847f8eSopenharmony_ci * @crossplatform 195061847f8eSopenharmony_ci * @since 10 195161847f8eSopenharmony_ci */ 195261847f8eSopenharmony_ci /** 195361847f8eSopenharmony_ci * Obtains the number of times that values are evicted from the buffer. 195461847f8eSopenharmony_ci * 195561847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are evicted from the buffer. 195661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 195761847f8eSopenharmony_ci * @crossplatform 195861847f8eSopenharmony_ci * @atomicservice 195961847f8eSopenharmony_ci * @since 12 196061847f8eSopenharmony_ci */ 196161847f8eSopenharmony_ci getRemovalCount(): number; 196261847f8eSopenharmony_ci 196361847f8eSopenharmony_ci /** 196461847f8eSopenharmony_ci * Obtains the number of times that the queried values are successfully matched. 196561847f8eSopenharmony_ci * 196661847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are successfully matched. 196761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 196861847f8eSopenharmony_ci * @since 9 196961847f8eSopenharmony_ci */ 197061847f8eSopenharmony_ci /** 197161847f8eSopenharmony_ci * Obtains the number of times that the queried values are successfully matched. 197261847f8eSopenharmony_ci * 197361847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are successfully matched. 197461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 197561847f8eSopenharmony_ci * @crossplatform 197661847f8eSopenharmony_ci * @since 10 197761847f8eSopenharmony_ci */ 197861847f8eSopenharmony_ci /** 197961847f8eSopenharmony_ci * Obtains the number of times that the queried values are successfully matched. 198061847f8eSopenharmony_ci * 198161847f8eSopenharmony_ci * @returns { number } Returns the number of times that the queried values are successfully matched. 198261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 198361847f8eSopenharmony_ci * @crossplatform 198461847f8eSopenharmony_ci * @atomicservice 198561847f8eSopenharmony_ci * @since 12 198661847f8eSopenharmony_ci */ 198761847f8eSopenharmony_ci getMatchCount(): number; 198861847f8eSopenharmony_ci 198961847f8eSopenharmony_ci /** 199061847f8eSopenharmony_ci * Obtains the number of times that values are added to the buffer. 199161847f8eSopenharmony_ci * 199261847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are added to the buffer. 199361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 199461847f8eSopenharmony_ci * @since 9 199561847f8eSopenharmony_ci */ 199661847f8eSopenharmony_ci /** 199761847f8eSopenharmony_ci * Obtains the number of times that values are added to the buffer. 199861847f8eSopenharmony_ci * 199961847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are added to the buffer. 200061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 200161847f8eSopenharmony_ci * @crossplatform 200261847f8eSopenharmony_ci * @since 10 200361847f8eSopenharmony_ci */ 200461847f8eSopenharmony_ci /** 200561847f8eSopenharmony_ci * Obtains the number of times that values are added to the buffer. 200661847f8eSopenharmony_ci * 200761847f8eSopenharmony_ci * @returns { number } Returns the number of times that values are added to the buffer. 200861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 200961847f8eSopenharmony_ci * @crossplatform 201061847f8eSopenharmony_ci * @atomicservice 201161847f8eSopenharmony_ci * @since 12 201261847f8eSopenharmony_ci */ 201361847f8eSopenharmony_ci getPutCount(): number; 201461847f8eSopenharmony_ci 201561847f8eSopenharmony_ci /** 201661847f8eSopenharmony_ci * Checks whether the current buffer is empty. 201761847f8eSopenharmony_ci * 201861847f8eSopenharmony_ci * @returns { boolean } Returns true if the current buffer contains no value. 201961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 202061847f8eSopenharmony_ci * @since 9 202161847f8eSopenharmony_ci */ 202261847f8eSopenharmony_ci /** 202361847f8eSopenharmony_ci * Checks whether the current buffer is empty. 202461847f8eSopenharmony_ci * 202561847f8eSopenharmony_ci * @returns { boolean } Returns true if the current buffer contains no value. 202661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 202761847f8eSopenharmony_ci * @crossplatform 202861847f8eSopenharmony_ci * @since 10 202961847f8eSopenharmony_ci */ 203061847f8eSopenharmony_ci /** 203161847f8eSopenharmony_ci * Checks whether the current buffer is empty. 203261847f8eSopenharmony_ci * 203361847f8eSopenharmony_ci * @returns { boolean } Returns true if the current buffer contains no value. 203461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 203561847f8eSopenharmony_ci * @crossplatform 203661847f8eSopenharmony_ci * @atomicservice 203761847f8eSopenharmony_ci * @since 12 203861847f8eSopenharmony_ci */ 203961847f8eSopenharmony_ci isEmpty(): boolean; 204061847f8eSopenharmony_ci 204161847f8eSopenharmony_ci /** 204261847f8eSopenharmony_ci * Obtains the value associated with a specified key. 204361847f8eSopenharmony_ci * 204461847f8eSopenharmony_ci * @param { K } key - Indicates the key to query. 204561847f8eSopenharmony_ci * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise. 204661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 204761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 204861847f8eSopenharmony_ci * 2.Incorrect parameter types. 204961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 205061847f8eSopenharmony_ci * @since 9 205161847f8eSopenharmony_ci */ 205261847f8eSopenharmony_ci /** 205361847f8eSopenharmony_ci * Obtains the value associated with a specified key. 205461847f8eSopenharmony_ci * 205561847f8eSopenharmony_ci * @param { K } key - Indicates the key to query. 205661847f8eSopenharmony_ci * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise. 205761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 205861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 205961847f8eSopenharmony_ci * 2.Incorrect parameter types. 206061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 206161847f8eSopenharmony_ci * @crossplatform 206261847f8eSopenharmony_ci * @since 10 206361847f8eSopenharmony_ci */ 206461847f8eSopenharmony_ci /** 206561847f8eSopenharmony_ci * Obtains the value associated with a specified key. 206661847f8eSopenharmony_ci * 206761847f8eSopenharmony_ci * @param { K } key - Indicates the key to query. 206861847f8eSopenharmony_ci * @returns { V | undefined } Returns the value associated with the key if the specified key is present in the buffer; returns null otherwise. 206961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 207061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 207161847f8eSopenharmony_ci * 2.Incorrect parameter types. 207261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 207361847f8eSopenharmony_ci * @crossplatform 207461847f8eSopenharmony_ci * @atomicservice 207561847f8eSopenharmony_ci * @since 12 207661847f8eSopenharmony_ci */ 207761847f8eSopenharmony_ci get(key: K): V | undefined; 207861847f8eSopenharmony_ci 207961847f8eSopenharmony_ci /** 208061847f8eSopenharmony_ci * Adds a key-value pair to the buffer. 208161847f8eSopenharmony_ci * 208261847f8eSopenharmony_ci * @param { K } key - Indicates the key to add. 208361847f8eSopenharmony_ci * @param { V } value - Indicates the value associated with the key to add. 208461847f8eSopenharmony_ci * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists. 208561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 208661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 208761847f8eSopenharmony_ci * 2.Incorrect parameter types. 208861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 208961847f8eSopenharmony_ci * @since 9 209061847f8eSopenharmony_ci */ 209161847f8eSopenharmony_ci /** 209261847f8eSopenharmony_ci * Adds a key-value pair to the buffer. 209361847f8eSopenharmony_ci * 209461847f8eSopenharmony_ci * @param { K } key - Indicates the key to add. 209561847f8eSopenharmony_ci * @param { V } value - Indicates the value associated with the key to add. 209661847f8eSopenharmony_ci * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists. 209761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 209861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 209961847f8eSopenharmony_ci * 2.Incorrect parameter types. 210061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 210161847f8eSopenharmony_ci * @crossplatform 210261847f8eSopenharmony_ci * @since 10 210361847f8eSopenharmony_ci */ 210461847f8eSopenharmony_ci /** 210561847f8eSopenharmony_ci * Adds a key-value pair to the buffer. 210661847f8eSopenharmony_ci * 210761847f8eSopenharmony_ci * @param { K } key - Indicates the key to add. 210861847f8eSopenharmony_ci * @param { V } value - Indicates the value associated with the key to add. 210961847f8eSopenharmony_ci * @returns { V } Returns the value associated with the added key; returns the original value if the key to add already exists. 211061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 211161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 211261847f8eSopenharmony_ci * 2.Incorrect parameter types. 211361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 211461847f8eSopenharmony_ci * @crossplatform 211561847f8eSopenharmony_ci * @atomicservice 211661847f8eSopenharmony_ci * @since 12 211761847f8eSopenharmony_ci */ 211861847f8eSopenharmony_ci put(key: K, value: V): V; 211961847f8eSopenharmony_ci 212061847f8eSopenharmony_ci /** 212161847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 212261847f8eSopenharmony_ci * 212361847f8eSopenharmony_ci * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed. 212461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 212561847f8eSopenharmony_ci * @since 9 212661847f8eSopenharmony_ci */ 212761847f8eSopenharmony_ci /** 212861847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 212961847f8eSopenharmony_ci * 213061847f8eSopenharmony_ci * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed. 213161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 213261847f8eSopenharmony_ci * @crossplatform 213361847f8eSopenharmony_ci * @since 10 213461847f8eSopenharmony_ci */ 213561847f8eSopenharmony_ci /** 213661847f8eSopenharmony_ci * Obtains a list of all values in the current buffer. 213761847f8eSopenharmony_ci * 213861847f8eSopenharmony_ci * @returns { V[] } Returns the list of all values in the current buffer in ascending order, from the most recently accessed to least recently accessed. 213961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 214061847f8eSopenharmony_ci * @crossplatform 214161847f8eSopenharmony_ci * @atomicservice 214261847f8eSopenharmony_ci * @since 12 214361847f8eSopenharmony_ci */ 214461847f8eSopenharmony_ci values(): V[]; 214561847f8eSopenharmony_ci 214661847f8eSopenharmony_ci /** 214761847f8eSopenharmony_ci * Obtains a list of keys for the values in the current buffer. 214861847f8eSopenharmony_ci * since 9 214961847f8eSopenharmony_ci * 215061847f8eSopenharmony_ci * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed. 215161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 215261847f8eSopenharmony_ci * @since 9 215361847f8eSopenharmony_ci */ 215461847f8eSopenharmony_ci /** 215561847f8eSopenharmony_ci * Obtains a list of keys for the values in the current buffer. 215661847f8eSopenharmony_ci * since 9 215761847f8eSopenharmony_ci * 215861847f8eSopenharmony_ci * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed. 215961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 216061847f8eSopenharmony_ci * @crossplatform 216161847f8eSopenharmony_ci * @since 10 216261847f8eSopenharmony_ci */ 216361847f8eSopenharmony_ci /** 216461847f8eSopenharmony_ci * Obtains a list of keys for the values in the current buffer. 216561847f8eSopenharmony_ci * since 9 216661847f8eSopenharmony_ci * 216761847f8eSopenharmony_ci * @returns { K[] } Returns a list of keys sorted from most recently accessed to least recently accessed. 216861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 216961847f8eSopenharmony_ci * @crossplatform 217061847f8eSopenharmony_ci * @atomicservice 217161847f8eSopenharmony_ci * @since 12 217261847f8eSopenharmony_ci */ 217361847f8eSopenharmony_ci keys(): K[]; 217461847f8eSopenharmony_ci 217561847f8eSopenharmony_ci /** 217661847f8eSopenharmony_ci * Deletes a specified key and its associated value from the current buffer. 217761847f8eSopenharmony_ci * 217861847f8eSopenharmony_ci * @param { K } key - Indicates the key to delete. 217961847f8eSopenharmony_ci * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist. 218061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 218161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 218261847f8eSopenharmony_ci * 2.Incorrect parameter types. 218361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 218461847f8eSopenharmony_ci * @since 9 218561847f8eSopenharmony_ci */ 218661847f8eSopenharmony_ci /** 218761847f8eSopenharmony_ci * Deletes a specified key and its associated value from the current buffer. 218861847f8eSopenharmony_ci * 218961847f8eSopenharmony_ci * @param { K } key - Indicates the key to delete. 219061847f8eSopenharmony_ci * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist. 219161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 219261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 219361847f8eSopenharmony_ci * 2.Incorrect parameter types. 219461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 219561847f8eSopenharmony_ci * @crossplatform 219661847f8eSopenharmony_ci * @since 10 219761847f8eSopenharmony_ci */ 219861847f8eSopenharmony_ci /** 219961847f8eSopenharmony_ci * Deletes a specified key and its associated value from the current buffer. 220061847f8eSopenharmony_ci * 220161847f8eSopenharmony_ci * @param { K } key - Indicates the key to delete. 220261847f8eSopenharmony_ci * @returns { V | undefined } Returns an Optional object containing the deleted key-value pair; returns an empty Optional object if the key does not exist. 220361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 220461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 220561847f8eSopenharmony_ci * 2.Incorrect parameter types. 220661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 220761847f8eSopenharmony_ci * @crossplatform 220861847f8eSopenharmony_ci * @atomicservice 220961847f8eSopenharmony_ci * @since 12 221061847f8eSopenharmony_ci */ 221161847f8eSopenharmony_ci remove(key: K): V | undefined; 221261847f8eSopenharmony_ci 221361847f8eSopenharmony_ci /** 221461847f8eSopenharmony_ci * Executes subsequent operations after a value is deleted. 221561847f8eSopenharmony_ci * 221661847f8eSopenharmony_ci * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity, 221761847f8eSopenharmony_ci * and the parameter value is false in other cases. 221861847f8eSopenharmony_ci * @param { K } key - Indicates the deleted key. 221961847f8eSopenharmony_ci * @param { V } value - Indicates the deleted value. 222061847f8eSopenharmony_ci * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object) 222161847f8eSopenharmony_ci * method is called and the key to add already exists. The parameter value is null in other cases. 222261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 222361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 222461847f8eSopenharmony_ci * 2.Incorrect parameter types. 222561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 222661847f8eSopenharmony_ci * @since 9 222761847f8eSopenharmony_ci */ 222861847f8eSopenharmony_ci /** 222961847f8eSopenharmony_ci * Executes subsequent operations after a value is deleted. 223061847f8eSopenharmony_ci * 223161847f8eSopenharmony_ci * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity, 223261847f8eSopenharmony_ci * and the parameter value is false in other cases. 223361847f8eSopenharmony_ci * @param { K } key - Indicates the deleted key. 223461847f8eSopenharmony_ci * @param { V } value - Indicates the deleted value. 223561847f8eSopenharmony_ci * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object) 223661847f8eSopenharmony_ci * method is called and the key to add already exists. The parameter value is null in other cases. 223761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 223861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 223961847f8eSopenharmony_ci * 2.Incorrect parameter types. 224061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 224161847f8eSopenharmony_ci * @crossplatform 224261847f8eSopenharmony_ci * @since 10 224361847f8eSopenharmony_ci */ 224461847f8eSopenharmony_ci /** 224561847f8eSopenharmony_ci * Executes subsequent operations after a value is deleted. 224661847f8eSopenharmony_ci * 224761847f8eSopenharmony_ci * @param { boolean } isEvict - The parameter value is true if this method is called due to insufficient capacity, 224861847f8eSopenharmony_ci * and the parameter value is false in other cases. 224961847f8eSopenharmony_ci * @param { K } key - Indicates the deleted key. 225061847f8eSopenharmony_ci * @param { V } value - Indicates the deleted value. 225161847f8eSopenharmony_ci * @param { V } newValue - The parameter value is the new value associated if the put(java.lang.Object,java.lang.Object) 225261847f8eSopenharmony_ci * method is called and the key to add already exists. The parameter value is null in other cases. 225361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 225461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 225561847f8eSopenharmony_ci * 2.Incorrect parameter types. 225661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 225761847f8eSopenharmony_ci * @crossplatform 225861847f8eSopenharmony_ci * @atomicservice 225961847f8eSopenharmony_ci * @since 12 226061847f8eSopenharmony_ci */ 226161847f8eSopenharmony_ci afterRemoval(isEvict: boolean, key: K, value: V, newValue: V): void; 226261847f8eSopenharmony_ci 226361847f8eSopenharmony_ci /** 226461847f8eSopenharmony_ci * Checks whether the current buffer contains a specified key. 226561847f8eSopenharmony_ci * 226661847f8eSopenharmony_ci * @param { K } key - Indicates the key to check. 226761847f8eSopenharmony_ci * @returns { boolean } Returns true if the buffer contains the specified key. 226861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 226961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 227061847f8eSopenharmony_ci * 2.Incorrect parameter types. 227161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 227261847f8eSopenharmony_ci * @since 9 227361847f8eSopenharmony_ci */ 227461847f8eSopenharmony_ci /** 227561847f8eSopenharmony_ci * Checks whether the current buffer contains a specified key. 227661847f8eSopenharmony_ci * 227761847f8eSopenharmony_ci * @param { K } key - Indicates the key to check. 227861847f8eSopenharmony_ci * @returns { boolean } Returns true if the buffer contains the specified key. 227961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 228061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 228161847f8eSopenharmony_ci * 2.Incorrect parameter types. 228261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 228361847f8eSopenharmony_ci * @crossplatform 228461847f8eSopenharmony_ci * @since 10 228561847f8eSopenharmony_ci */ 228661847f8eSopenharmony_ci /** 228761847f8eSopenharmony_ci * Checks whether the current buffer contains a specified key. 228861847f8eSopenharmony_ci * 228961847f8eSopenharmony_ci * @param { K } key - Indicates the key to check. 229061847f8eSopenharmony_ci * @returns { boolean } Returns true if the buffer contains the specified key. 229161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 229261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 229361847f8eSopenharmony_ci * 2.Incorrect parameter types. 229461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 229561847f8eSopenharmony_ci * @crossplatform 229661847f8eSopenharmony_ci * @atomicservice 229761847f8eSopenharmony_ci * @since 12 229861847f8eSopenharmony_ci */ 229961847f8eSopenharmony_ci contains(key: K): boolean; 230061847f8eSopenharmony_ci 230161847f8eSopenharmony_ci /** 230261847f8eSopenharmony_ci * Executes subsequent operations if miss to compute a value for the specific key. 230361847f8eSopenharmony_ci * 230461847f8eSopenharmony_ci * @param { K } key - Indicates the missed key. 230561847f8eSopenharmony_ci * @returns { V } Returns the value associated with the key. 230661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 230761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 230861847f8eSopenharmony_ci * 2.Incorrect parameter types. 230961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 231061847f8eSopenharmony_ci * @since 9 231161847f8eSopenharmony_ci */ 231261847f8eSopenharmony_ci /** 231361847f8eSopenharmony_ci * Executes subsequent operations if miss to compute a value for the specific key. 231461847f8eSopenharmony_ci * 231561847f8eSopenharmony_ci * @param { K } key - Indicates the missed key. 231661847f8eSopenharmony_ci * @returns { V } Returns the value associated with the key. 231761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 231861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 231961847f8eSopenharmony_ci * 2.Incorrect parameter types. 232061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 232161847f8eSopenharmony_ci * @crossplatform 232261847f8eSopenharmony_ci * @since 10 232361847f8eSopenharmony_ci */ 232461847f8eSopenharmony_ci /** 232561847f8eSopenharmony_ci * Executes subsequent operations if miss to compute a value for the specific key. 232661847f8eSopenharmony_ci * 232761847f8eSopenharmony_ci * @param { K } key - Indicates the missed key. 232861847f8eSopenharmony_ci * @returns { V } Returns the value associated with the key. 232961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 233061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 233161847f8eSopenharmony_ci * 2.Incorrect parameter types. 233261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 233361847f8eSopenharmony_ci * @crossplatform 233461847f8eSopenharmony_ci * @atomicservice 233561847f8eSopenharmony_ci * @since 12 233661847f8eSopenharmony_ci */ 233761847f8eSopenharmony_ci createDefault(key: K): V; 233861847f8eSopenharmony_ci 233961847f8eSopenharmony_ci /** 234061847f8eSopenharmony_ci * Returns an array of key-value pairs of enumeratable properties of a given object. 234161847f8eSopenharmony_ci * 234261847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself. 234361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 234461847f8eSopenharmony_ci * @since 9 234561847f8eSopenharmony_ci */ 234661847f8eSopenharmony_ci /** 234761847f8eSopenharmony_ci * Returns an array of key-value pairs of enumeratable properties of a given object. 234861847f8eSopenharmony_ci * 234961847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself. 235061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 235161847f8eSopenharmony_ci * @crossplatform 235261847f8eSopenharmony_ci * @since 10 235361847f8eSopenharmony_ci */ 235461847f8eSopenharmony_ci /** 235561847f8eSopenharmony_ci * Returns an array of key-value pairs of enumeratable properties of a given object. 235661847f8eSopenharmony_ci * 235761847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns an array of key-value pairs for the enumeratable properties of the given object itself. 235861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 235961847f8eSopenharmony_ci * @crossplatform 236061847f8eSopenharmony_ci * @atomicservice 236161847f8eSopenharmony_ci * @since 12 236261847f8eSopenharmony_ci */ 236361847f8eSopenharmony_ci entries(): IterableIterator<[K, V]>; 236461847f8eSopenharmony_ci 236561847f8eSopenharmony_ci /** 236661847f8eSopenharmony_ci * Specifies the default iterator for an object. 236761847f8eSopenharmony_ci * 236861847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs. 236961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 237061847f8eSopenharmony_ci * @since 9 237161847f8eSopenharmony_ci */ 237261847f8eSopenharmony_ci /** 237361847f8eSopenharmony_ci * Specifies the default iterator for an object. 237461847f8eSopenharmony_ci * 237561847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs. 237661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 237761847f8eSopenharmony_ci * @crossplatform 237861847f8eSopenharmony_ci * @since 10 237961847f8eSopenharmony_ci */ 238061847f8eSopenharmony_ci /** 238161847f8eSopenharmony_ci * Specifies the default iterator for an object. 238261847f8eSopenharmony_ci * 238361847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Returns a two - dimensional array in the form of key - value pairs. 238461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 238561847f8eSopenharmony_ci * @crossplatform 238661847f8eSopenharmony_ci * @atomicservice 238761847f8eSopenharmony_ci * @since 12 238861847f8eSopenharmony_ci */ 238961847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<[K, V]>; 239061847f8eSopenharmony_ci } 239161847f8eSopenharmony_ci 239261847f8eSopenharmony_ci /** 239361847f8eSopenharmony_ci * The ScopeComparable contains comparison methods. 239461847f8eSopenharmony_ci * 239561847f8eSopenharmony_ci * @interface ScopeComparable 239661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 239761847f8eSopenharmony_ci * @since 7 239861847f8eSopenharmony_ci */ 239961847f8eSopenharmony_ci /** 240061847f8eSopenharmony_ci * The ScopeComparable contains comparison methods. 240161847f8eSopenharmony_ci * 240261847f8eSopenharmony_ci * @interface ScopeComparable 240361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 240461847f8eSopenharmony_ci * @crossplatform 240561847f8eSopenharmony_ci * @since 10 240661847f8eSopenharmony_ci */ 240761847f8eSopenharmony_ci /** 240861847f8eSopenharmony_ci * The ScopeComparable contains comparison methods. 240961847f8eSopenharmony_ci * 241061847f8eSopenharmony_ci * @interface ScopeComparable 241161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 241261847f8eSopenharmony_ci * @crossplatform 241361847f8eSopenharmony_ci * @atomicservice 241461847f8eSopenharmony_ci * @since 12 241561847f8eSopenharmony_ci */ 241661847f8eSopenharmony_ci interface ScopeComparable { 241761847f8eSopenharmony_ci /** 241861847f8eSopenharmony_ci * The comparison function is used by the scope. 241961847f8eSopenharmony_ci * 242061847f8eSopenharmony_ci * @param { ScopeComparable } other - Other 242161847f8eSopenharmony_ci * @returns { boolean } Returns whether the current object is greater than or equal to the input object. 242261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 242361847f8eSopenharmony_ci * @since 8 242461847f8eSopenharmony_ci */ 242561847f8eSopenharmony_ci /** 242661847f8eSopenharmony_ci * The comparison function is used by the scope. 242761847f8eSopenharmony_ci * 242861847f8eSopenharmony_ci * @param { ScopeComparable } other - Other 242961847f8eSopenharmony_ci * @returns { boolean } Returns whether the current object is greater than or equal to the input object. 243061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 243161847f8eSopenharmony_ci * @crossplatform 243261847f8eSopenharmony_ci * @since 10 243361847f8eSopenharmony_ci */ 243461847f8eSopenharmony_ci /** 243561847f8eSopenharmony_ci * The comparison function is used by the scope. 243661847f8eSopenharmony_ci * 243761847f8eSopenharmony_ci * @param { ScopeComparable } other - Other 243861847f8eSopenharmony_ci * @returns { boolean } Returns whether the current object is greater than or equal to the input object. 243961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 244061847f8eSopenharmony_ci * @crossplatform 244161847f8eSopenharmony_ci * @atomicservice 244261847f8eSopenharmony_ci * @since 12 244361847f8eSopenharmony_ci */ 244461847f8eSopenharmony_ci compareTo(other: ScopeComparable): boolean; 244561847f8eSopenharmony_ci } 244661847f8eSopenharmony_ci 244761847f8eSopenharmony_ci /** 244861847f8eSopenharmony_ci * A type used to denote ScopeComparable or number. 244961847f8eSopenharmony_ci * 245061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 245161847f8eSopenharmony_ci * @since 8 245261847f8eSopenharmony_ci */ 245361847f8eSopenharmony_ci /** 245461847f8eSopenharmony_ci * A type used to denote ScopeComparable or number. 245561847f8eSopenharmony_ci * 245661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 245761847f8eSopenharmony_ci * @crossplatform 245861847f8eSopenharmony_ci * @since 10 245961847f8eSopenharmony_ci */ 246061847f8eSopenharmony_ci /** 246161847f8eSopenharmony_ci * A type used to denote ScopeComparable or number. 246261847f8eSopenharmony_ci * 246361847f8eSopenharmony_ci * @typedef { ScopeComparable | number } 246461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 246561847f8eSopenharmony_ci * @crossplatform 246661847f8eSopenharmony_ci * @atomicservice 246761847f8eSopenharmony_ci * @since 12 246861847f8eSopenharmony_ci */ 246961847f8eSopenharmony_ci type ScopeType = ScopeComparable | number; 247061847f8eSopenharmony_ci 247161847f8eSopenharmony_ci /** 247261847f8eSopenharmony_ci * The Scope interface is used to describe the valid range of a field. 247361847f8eSopenharmony_ci * 247461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 247561847f8eSopenharmony_ci * @since 8 247661847f8eSopenharmony_ci * @deprecated since 9 247761847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper 247861847f8eSopenharmony_ci */ 247961847f8eSopenharmony_ci class Scope { 248061847f8eSopenharmony_ci /** 248161847f8eSopenharmony_ci * A constructor used to create a Scope instance with the lower and upper bounds specified. 248261847f8eSopenharmony_ci * 248361847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 248461847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 248561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 248661847f8eSopenharmony_ci * @since 8 248761847f8eSopenharmony_ci * @deprecated since 9 248861847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.constructor 248961847f8eSopenharmony_ci */ 249061847f8eSopenharmony_ci constructor(lowerObj: ScopeType, upperObj: ScopeType); 249161847f8eSopenharmony_ci 249261847f8eSopenharmony_ci /** 249361847f8eSopenharmony_ci * Obtains a string representation of the current range. 249461847f8eSopenharmony_ci * 249561847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current range object. 249661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 249761847f8eSopenharmony_ci * @since 8 249861847f8eSopenharmony_ci * @deprecated since 9 249961847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.toString 250061847f8eSopenharmony_ci */ 250161847f8eSopenharmony_ci toString(): string; 250261847f8eSopenharmony_ci 250361847f8eSopenharmony_ci /** 250461847f8eSopenharmony_ci * Returns the intersection of a given range and the current range. 250561847f8eSopenharmony_ci * 250661847f8eSopenharmony_ci * @param { Scope } range - A Scope range object 250761847f8eSopenharmony_ci * @returns { Scope } Returns the intersection of a given range and the current range. 250861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 250961847f8eSopenharmony_ci * @since 8 251061847f8eSopenharmony_ci * @deprecated since 9 251161847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.intersect 251261847f8eSopenharmony_ci */ 251361847f8eSopenharmony_ci intersect(range: Scope): Scope; 251461847f8eSopenharmony_ci 251561847f8eSopenharmony_ci /** 251661847f8eSopenharmony_ci * Returns the intersection of the current range and the range specified by the given lower and upper bounds. 251761847f8eSopenharmony_ci * 251861847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 251961847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 252061847f8eSopenharmony_ci * @returns { Scope } Returns the intersection of the current range and the range specified by the given lower and upper bounds. 252161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 252261847f8eSopenharmony_ci * @since 8 252361847f8eSopenharmony_ci * @deprecated since 9 252461847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.intersect 252561847f8eSopenharmony_ci */ 252661847f8eSopenharmony_ci intersect(lowerObj: ScopeType, upperObj: ScopeType): Scope; 252761847f8eSopenharmony_ci 252861847f8eSopenharmony_ci /** 252961847f8eSopenharmony_ci * Obtains the upper bound of the current range. 253061847f8eSopenharmony_ci * 253161847f8eSopenharmony_ci * @returns { ScopeType } Returns the upper bound of the current range. 253261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 253361847f8eSopenharmony_ci * @since 8 253461847f8eSopenharmony_ci * @deprecated since 9 253561847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.getUpper 253661847f8eSopenharmony_ci */ 253761847f8eSopenharmony_ci getUpper(): ScopeType; 253861847f8eSopenharmony_ci 253961847f8eSopenharmony_ci /** 254061847f8eSopenharmony_ci * Obtains the lower bound of the current range. 254161847f8eSopenharmony_ci * 254261847f8eSopenharmony_ci * @returns { ScopeType } Returns the lower bound of the current range. 254361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 254461847f8eSopenharmony_ci * @since 8 254561847f8eSopenharmony_ci * @deprecated since 9 254661847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.getLower 254761847f8eSopenharmony_ci */ 254861847f8eSopenharmony_ci getLower(): ScopeType; 254961847f8eSopenharmony_ci 255061847f8eSopenharmony_ci /** 255161847f8eSopenharmony_ci * Creates the smallest range that includes the current range and the given lower and upper bounds. 255261847f8eSopenharmony_ci * 255361847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 255461847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 255561847f8eSopenharmony_ci * @returns { Scope } Returns the smallest range that includes the current range and the given lower and upper bounds. 255661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 255761847f8eSopenharmony_ci * @since 8 255861847f8eSopenharmony_ci * @deprecated since 9 255961847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.expand 256061847f8eSopenharmony_ci */ 256161847f8eSopenharmony_ci expand(lowerObj: ScopeType, upperObj: ScopeType): Scope; 256261847f8eSopenharmony_ci 256361847f8eSopenharmony_ci /** 256461847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given range. 256561847f8eSopenharmony_ci * 256661847f8eSopenharmony_ci * @param { Scope } range - A Scope range object 256761847f8eSopenharmony_ci * @returns { Scope } Returns the smallest range that includes the current range and a given range. 256861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 256961847f8eSopenharmony_ci * @since 8 257061847f8eSopenharmony_ci * @deprecated since 9 257161847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.expand 257261847f8eSopenharmony_ci */ 257361847f8eSopenharmony_ci expand(range: Scope): Scope; 257461847f8eSopenharmony_ci 257561847f8eSopenharmony_ci /** 257661847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given value. 257761847f8eSopenharmony_ci * 257861847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 257961847f8eSopenharmony_ci * @returns { Scope } Returns the smallest range that includes the current range and a given value. 258061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 258161847f8eSopenharmony_ci * @since 8 258261847f8eSopenharmony_ci * @deprecated since 9 258361847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.expand 258461847f8eSopenharmony_ci */ 258561847f8eSopenharmony_ci expand(value: ScopeType): Scope; 258661847f8eSopenharmony_ci 258761847f8eSopenharmony_ci /** 258861847f8eSopenharmony_ci * Checks whether a given value is within the current range. 258961847f8eSopenharmony_ci * 259061847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 259161847f8eSopenharmony_ci * @returns { boolean } If the value is within the current range return true,otherwise return false. 259261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 259361847f8eSopenharmony_ci * @since 8 259461847f8eSopenharmony_ci * @deprecated since 9 259561847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.contains 259661847f8eSopenharmony_ci */ 259761847f8eSopenharmony_ci contains(value: ScopeType): boolean; 259861847f8eSopenharmony_ci 259961847f8eSopenharmony_ci /** 260061847f8eSopenharmony_ci * Checks whether a given range is within the current range. 260161847f8eSopenharmony_ci * 260261847f8eSopenharmony_ci * @param { Scope } range - A Scope range 260361847f8eSopenharmony_ci * @returns { boolean } If the current range is within the given range return true,otherwise return false. 260461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 260561847f8eSopenharmony_ci * @since 8 260661847f8eSopenharmony_ci * @deprecated since 9 260761847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.contains 260861847f8eSopenharmony_ci */ 260961847f8eSopenharmony_ci contains(range: Scope): boolean; 261061847f8eSopenharmony_ci 261161847f8eSopenharmony_ci /** 261261847f8eSopenharmony_ci * Clamps a given value to the current range. 261361847f8eSopenharmony_ci * 261461847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 261561847f8eSopenharmony_ci * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range.. 261661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 261761847f8eSopenharmony_ci * @since 8 261861847f8eSopenharmony_ci * @deprecated since 9 261961847f8eSopenharmony_ci * @useinstead ohos.util.ScopeHelper.clamp 262061847f8eSopenharmony_ci */ 262161847f8eSopenharmony_ci clamp(value: ScopeType): ScopeType; 262261847f8eSopenharmony_ci } 262361847f8eSopenharmony_ci 262461847f8eSopenharmony_ci /** 262561847f8eSopenharmony_ci * The ScopeHelper interface is used to describe the valid range of a field. 262661847f8eSopenharmony_ci * 262761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 262861847f8eSopenharmony_ci * @since 9 262961847f8eSopenharmony_ci */ 263061847f8eSopenharmony_ci /** 263161847f8eSopenharmony_ci * The ScopeHelper interface is used to describe the valid range of a field. 263261847f8eSopenharmony_ci * 263361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 263461847f8eSopenharmony_ci * @crossplatform 263561847f8eSopenharmony_ci * @since 10 263661847f8eSopenharmony_ci */ 263761847f8eSopenharmony_ci /** 263861847f8eSopenharmony_ci * The ScopeHelper interface is used to describe the valid range of a field. 263961847f8eSopenharmony_ci * 264061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 264161847f8eSopenharmony_ci * @crossplatform 264261847f8eSopenharmony_ci * @atomicservice 264361847f8eSopenharmony_ci * @since 12 264461847f8eSopenharmony_ci */ 264561847f8eSopenharmony_ci class ScopeHelper { 264661847f8eSopenharmony_ci /** 264761847f8eSopenharmony_ci * A constructor used to create a Scope instance with the lower and upper bounds specified. 264861847f8eSopenharmony_ci * 264961847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 265061847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 265161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 265261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 265361847f8eSopenharmony_ci * 2.Incorrect parameter types. 265461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 265561847f8eSopenharmony_ci * @since 9 265661847f8eSopenharmony_ci */ 265761847f8eSopenharmony_ci /** 265861847f8eSopenharmony_ci * A constructor used to create a Scope instance with the lower and upper bounds specified. 265961847f8eSopenharmony_ci * 266061847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 266161847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 266261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 266361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 266461847f8eSopenharmony_ci * 2.Incorrect parameter types. 266561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 266661847f8eSopenharmony_ci * @crossplatform 266761847f8eSopenharmony_ci * @since 10 266861847f8eSopenharmony_ci */ 266961847f8eSopenharmony_ci /** 267061847f8eSopenharmony_ci * A constructor used to create a Scope instance with the lower and upper bounds specified. 267161847f8eSopenharmony_ci * 267261847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 267361847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 267461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 267561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 267661847f8eSopenharmony_ci * 2.Incorrect parameter types. 267761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 267861847f8eSopenharmony_ci * @crossplatform 267961847f8eSopenharmony_ci * @atomicservice 268061847f8eSopenharmony_ci * @since 12 268161847f8eSopenharmony_ci */ 268261847f8eSopenharmony_ci constructor(lowerObj: ScopeType, upperObj: ScopeType); 268361847f8eSopenharmony_ci 268461847f8eSopenharmony_ci /** 268561847f8eSopenharmony_ci * Obtains a string representation of the current range. 268661847f8eSopenharmony_ci * 268761847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current range object. 268861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 268961847f8eSopenharmony_ci * @since 9 269061847f8eSopenharmony_ci */ 269161847f8eSopenharmony_ci /** 269261847f8eSopenharmony_ci * Obtains a string representation of the current range. 269361847f8eSopenharmony_ci * 269461847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current range object. 269561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 269661847f8eSopenharmony_ci * @crossplatform 269761847f8eSopenharmony_ci * @since 10 269861847f8eSopenharmony_ci */ 269961847f8eSopenharmony_ci /** 270061847f8eSopenharmony_ci * Obtains a string representation of the current range. 270161847f8eSopenharmony_ci * 270261847f8eSopenharmony_ci * @returns { string } Returns a string representation of the current range object. 270361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 270461847f8eSopenharmony_ci * @crossplatform 270561847f8eSopenharmony_ci * @atomicservice 270661847f8eSopenharmony_ci * @since 12 270761847f8eSopenharmony_ci */ 270861847f8eSopenharmony_ci toString(): string; 270961847f8eSopenharmony_ci 271061847f8eSopenharmony_ci /** 271161847f8eSopenharmony_ci * Returns the intersection of a given range and the current range. 271261847f8eSopenharmony_ci * 271361847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range object 271461847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the intersection of a given range and the current range. 271561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 271661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 271761847f8eSopenharmony_ci * 2.Incorrect parameter types. 271861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 271961847f8eSopenharmony_ci * @since 9 272061847f8eSopenharmony_ci */ 272161847f8eSopenharmony_ci /** 272261847f8eSopenharmony_ci * Returns the intersection of a given range and the current range. 272361847f8eSopenharmony_ci * 272461847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range object 272561847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the intersection of a given range and the current range. 272661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 272761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 272861847f8eSopenharmony_ci * 2.Incorrect parameter types. 272961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 273061847f8eSopenharmony_ci * @crossplatform 273161847f8eSopenharmony_ci * @since 10 273261847f8eSopenharmony_ci */ 273361847f8eSopenharmony_ci /** 273461847f8eSopenharmony_ci * Returns the intersection of a given range and the current range. 273561847f8eSopenharmony_ci * 273661847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range object 273761847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the intersection of a given range and the current range. 273861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 273961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 274061847f8eSopenharmony_ci * 2.Incorrect parameter types. 274161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 274261847f8eSopenharmony_ci * @crossplatform 274361847f8eSopenharmony_ci * @atomicservice 274461847f8eSopenharmony_ci * @since 12 274561847f8eSopenharmony_ci */ 274661847f8eSopenharmony_ci intersect(range: ScopeHelper): ScopeHelper; 274761847f8eSopenharmony_ci 274861847f8eSopenharmony_ci /** 274961847f8eSopenharmony_ci * Returns the intersection of the current range and the range specified by the given lower and upper bounds. 275061847f8eSopenharmony_ci * 275161847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 275261847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 275361847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the intersection of the current range and the range specified by the given lower and upper bounds. 275461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 275561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 275661847f8eSopenharmony_ci * 2.Incorrect parameter types. 275761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 275861847f8eSopenharmony_ci * @since 9 275961847f8eSopenharmony_ci */ 276061847f8eSopenharmony_ci /** 276161847f8eSopenharmony_ci * Returns the intersection of the current range and the range specified by the given lower and upper bounds. 276261847f8eSopenharmony_ci * 276361847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 276461847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 276561847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the intersection of the current range and the range specified by the given lower and upper bounds. 276661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 276761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 276861847f8eSopenharmony_ci * 2.Incorrect parameter types. 276961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 277061847f8eSopenharmony_ci * @crossplatform 277161847f8eSopenharmony_ci * @since 10 277261847f8eSopenharmony_ci */ 277361847f8eSopenharmony_ci /** 277461847f8eSopenharmony_ci * Returns the intersection of the current range and the range specified by the given lower and upper bounds. 277561847f8eSopenharmony_ci * 277661847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 277761847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 277861847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the intersection of the current range and the range specified by the given lower and upper bounds. 277961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 278061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 278161847f8eSopenharmony_ci * 2.Incorrect parameter types. 278261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 278361847f8eSopenharmony_ci * @crossplatform 278461847f8eSopenharmony_ci * @atomicservice 278561847f8eSopenharmony_ci * @since 12 278661847f8eSopenharmony_ci */ 278761847f8eSopenharmony_ci intersect(lowerObj: ScopeType, upperObj: ScopeType): ScopeHelper; 278861847f8eSopenharmony_ci 278961847f8eSopenharmony_ci /** 279061847f8eSopenharmony_ci * Obtains the upper bound of the current range. 279161847f8eSopenharmony_ci * 279261847f8eSopenharmony_ci * @returns { ScopeType } Returns the upper bound of the current range. 279361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 279461847f8eSopenharmony_ci * @since 9 279561847f8eSopenharmony_ci */ 279661847f8eSopenharmony_ci /** 279761847f8eSopenharmony_ci * Obtains the upper bound of the current range. 279861847f8eSopenharmony_ci * 279961847f8eSopenharmony_ci * @returns { ScopeType } Returns the upper bound of the current range. 280061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 280161847f8eSopenharmony_ci * @crossplatform 280261847f8eSopenharmony_ci * @since 10 280361847f8eSopenharmony_ci */ 280461847f8eSopenharmony_ci /** 280561847f8eSopenharmony_ci * Obtains the upper bound of the current range. 280661847f8eSopenharmony_ci * 280761847f8eSopenharmony_ci * @returns { ScopeType } Returns the upper bound of the current range. 280861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 280961847f8eSopenharmony_ci * @crossplatform 281061847f8eSopenharmony_ci * @atomicservice 281161847f8eSopenharmony_ci * @since 12 281261847f8eSopenharmony_ci */ 281361847f8eSopenharmony_ci getUpper(): ScopeType; 281461847f8eSopenharmony_ci 281561847f8eSopenharmony_ci /** 281661847f8eSopenharmony_ci * Obtains the lower bound of the current range. 281761847f8eSopenharmony_ci * 281861847f8eSopenharmony_ci * @returns { ScopeType } Returns the lower bound of the current range. 281961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 282061847f8eSopenharmony_ci * @since 9 282161847f8eSopenharmony_ci */ 282261847f8eSopenharmony_ci /** 282361847f8eSopenharmony_ci * Obtains the lower bound of the current range. 282461847f8eSopenharmony_ci * 282561847f8eSopenharmony_ci * @returns { ScopeType } Returns the lower bound of the current range. 282661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 282761847f8eSopenharmony_ci * @crossplatform 282861847f8eSopenharmony_ci * @since 10 282961847f8eSopenharmony_ci */ 283061847f8eSopenharmony_ci /** 283161847f8eSopenharmony_ci * Obtains the lower bound of the current range. 283261847f8eSopenharmony_ci * 283361847f8eSopenharmony_ci * @returns { ScopeType } Returns the lower bound of the current range. 283461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 283561847f8eSopenharmony_ci * @crossplatform 283661847f8eSopenharmony_ci * @atomicservice 283761847f8eSopenharmony_ci * @since 12 283861847f8eSopenharmony_ci */ 283961847f8eSopenharmony_ci getLower(): ScopeType; 284061847f8eSopenharmony_ci 284161847f8eSopenharmony_ci /** 284261847f8eSopenharmony_ci * Creates the smallest range that includes the current range and the given lower and upper bounds. 284361847f8eSopenharmony_ci * 284461847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 284561847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 284661847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and the given lower and upper bounds. 284761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 284861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 284961847f8eSopenharmony_ci * 2.Incorrect parameter types. 285061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 285161847f8eSopenharmony_ci * @since 9 285261847f8eSopenharmony_ci */ 285361847f8eSopenharmony_ci /** 285461847f8eSopenharmony_ci * Creates the smallest range that includes the current range and the given lower and upper bounds. 285561847f8eSopenharmony_ci * 285661847f8eSopenharmony_ci * @param { ScopeType } lowerObj - A ScopeType value 285761847f8eSopenharmony_ci * @param { ScopeType } upperObj - A ScopeType value 285861847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and the given lower and upper bounds. 285961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 286061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 286161847f8eSopenharmony_ci * 2.Incorrect parameter types. 286261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 286361847f8eSopenharmony_ci * @atomicservice 286461847f8eSopenharmony_ci * @since 12 286561847f8eSopenharmony_ci */ 286661847f8eSopenharmony_ci expand(lowerObj: ScopeType, upperObj: ScopeType): ScopeHelper; 286761847f8eSopenharmony_ci 286861847f8eSopenharmony_ci /** 286961847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given range. 287061847f8eSopenharmony_ci * 287161847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range object 287261847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given range. 287361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 287461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 287561847f8eSopenharmony_ci * 2.Incorrect parameter types. 287661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 287761847f8eSopenharmony_ci * @since 9 287861847f8eSopenharmony_ci */ 287961847f8eSopenharmony_ci /** 288061847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given range. 288161847f8eSopenharmony_ci * 288261847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range object 288361847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given range. 288461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 288561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 288661847f8eSopenharmony_ci * 2.Incorrect parameter types. 288761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 288861847f8eSopenharmony_ci * @crossplatform 288961847f8eSopenharmony_ci * @since 10 289061847f8eSopenharmony_ci */ 289161847f8eSopenharmony_ci /** 289261847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given range. 289361847f8eSopenharmony_ci * 289461847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range object 289561847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given range. 289661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 289761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 289861847f8eSopenharmony_ci * 2.Incorrect parameter types. 289961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 290061847f8eSopenharmony_ci * @crossplatform 290161847f8eSopenharmony_ci * @atomicservice 290261847f8eSopenharmony_ci * @since 12 290361847f8eSopenharmony_ci */ 290461847f8eSopenharmony_ci expand(range: ScopeHelper): ScopeHelper; 290561847f8eSopenharmony_ci 290661847f8eSopenharmony_ci /** 290761847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given value. 290861847f8eSopenharmony_ci * 290961847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 291061847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given value. 291161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 291261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 291361847f8eSopenharmony_ci * 2.Incorrect parameter types. 291461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 291561847f8eSopenharmony_ci * @since 9 291661847f8eSopenharmony_ci */ 291761847f8eSopenharmony_ci /** 291861847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given value. 291961847f8eSopenharmony_ci * 292061847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 292161847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given value. 292261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 292361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 292461847f8eSopenharmony_ci * 2.Incorrect parameter types. 292561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 292661847f8eSopenharmony_ci * @crossplatform 292761847f8eSopenharmony_ci * @since 10 292861847f8eSopenharmony_ci */ 292961847f8eSopenharmony_ci /** 293061847f8eSopenharmony_ci * Creates the smallest range that includes the current range and a given value. 293161847f8eSopenharmony_ci * 293261847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 293361847f8eSopenharmony_ci * @returns { ScopeHelper } Returns the smallest range that includes the current range and a given value. 293461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 293561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 293661847f8eSopenharmony_ci * 2.Incorrect parameter types. 293761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 293861847f8eSopenharmony_ci * @crossplatform 293961847f8eSopenharmony_ci * @atomicservice 294061847f8eSopenharmony_ci * @since 12 294161847f8eSopenharmony_ci */ 294261847f8eSopenharmony_ci expand(value: ScopeType): ScopeHelper; 294361847f8eSopenharmony_ci 294461847f8eSopenharmony_ci /** 294561847f8eSopenharmony_ci * Checks whether a given value is within the current range. 294661847f8eSopenharmony_ci * 294761847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 294861847f8eSopenharmony_ci * @returns { boolean } If the value is within the current range return true,otherwise return false. 294961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 295061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 295161847f8eSopenharmony_ci * 2.Incorrect parameter types. 295261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 295361847f8eSopenharmony_ci * @since 9 295461847f8eSopenharmony_ci */ 295561847f8eSopenharmony_ci /** 295661847f8eSopenharmony_ci * Checks whether a given value is within the current range. 295761847f8eSopenharmony_ci * 295861847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 295961847f8eSopenharmony_ci * @returns { boolean } If the value is within the current range return true,otherwise return false. 296061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 296161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 296261847f8eSopenharmony_ci * 2.Incorrect parameter types. 296361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 296461847f8eSopenharmony_ci * @crossplatform 296561847f8eSopenharmony_ci * @since 10 296661847f8eSopenharmony_ci */ 296761847f8eSopenharmony_ci /** 296861847f8eSopenharmony_ci * Checks whether a given value is within the current range. 296961847f8eSopenharmony_ci * 297061847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 297161847f8eSopenharmony_ci * @returns { boolean } If the value is within the current range return true,otherwise return false. 297261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 297361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 297461847f8eSopenharmony_ci * 2.Incorrect parameter types. 297561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 297661847f8eSopenharmony_ci * @crossplatform 297761847f8eSopenharmony_ci * @atomicservice 297861847f8eSopenharmony_ci * @since 12 297961847f8eSopenharmony_ci */ 298061847f8eSopenharmony_ci contains(value: ScopeType): boolean; 298161847f8eSopenharmony_ci 298261847f8eSopenharmony_ci /** 298361847f8eSopenharmony_ci * Checks whether a given range is within the current range. 298461847f8eSopenharmony_ci * 298561847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range 298661847f8eSopenharmony_ci * @returns { boolean } If the current range is within the given range return true,otherwise return false. 298761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 298861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 298961847f8eSopenharmony_ci * 2.Incorrect parameter types. 299061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 299161847f8eSopenharmony_ci * @since 9 299261847f8eSopenharmony_ci */ 299361847f8eSopenharmony_ci /** 299461847f8eSopenharmony_ci * Checks whether a given range is within the current range. 299561847f8eSopenharmony_ci * 299661847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range 299761847f8eSopenharmony_ci * @returns { boolean } If the current range is within the given range return true,otherwise return false. 299861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 299961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 300061847f8eSopenharmony_ci * 2.Incorrect parameter types. 300161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 300261847f8eSopenharmony_ci * @crossplatform 300361847f8eSopenharmony_ci * @since 10 300461847f8eSopenharmony_ci */ 300561847f8eSopenharmony_ci /** 300661847f8eSopenharmony_ci * Checks whether a given range is within the current range. 300761847f8eSopenharmony_ci * 300861847f8eSopenharmony_ci * @param { ScopeHelper } range - A Scope range 300961847f8eSopenharmony_ci * @returns { boolean } If the current range is within the given range return true,otherwise return false. 301061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 301161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 301261847f8eSopenharmony_ci * 2.Incorrect parameter types. 301361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 301461847f8eSopenharmony_ci * @crossplatform 301561847f8eSopenharmony_ci * @atomicservice 301661847f8eSopenharmony_ci * @since 12 301761847f8eSopenharmony_ci */ 301861847f8eSopenharmony_ci contains(range: ScopeHelper): boolean; 301961847f8eSopenharmony_ci 302061847f8eSopenharmony_ci /** 302161847f8eSopenharmony_ci * Clamps a given value to the current range. 302261847f8eSopenharmony_ci * 302361847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 302461847f8eSopenharmony_ci * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range. 302561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 302661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 302761847f8eSopenharmony_ci * 2.Incorrect parameter types. 302861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 302961847f8eSopenharmony_ci * @since 9 303061847f8eSopenharmony_ci */ 303161847f8eSopenharmony_ci /** 303261847f8eSopenharmony_ci * Clamps a given value to the current range. 303361847f8eSopenharmony_ci * 303461847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 303561847f8eSopenharmony_ci * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range. 303661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 303761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 303861847f8eSopenharmony_ci * 2.Incorrect parameter types. 303961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 304061847f8eSopenharmony_ci * @crossplatform 304161847f8eSopenharmony_ci * @since 10 304261847f8eSopenharmony_ci */ 304361847f8eSopenharmony_ci /** 304461847f8eSopenharmony_ci * Clamps a given value to the current range. 304561847f8eSopenharmony_ci * 304661847f8eSopenharmony_ci * @param { ScopeType } value - A ScopeType value 304761847f8eSopenharmony_ci * @returns { ScopeType } Returns a ScopeType object that a given value is clamped to the current range. 304861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 304961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 305061847f8eSopenharmony_ci * 2.Incorrect parameter types. 305161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 305261847f8eSopenharmony_ci * @crossplatform 305361847f8eSopenharmony_ci * @atomicservice 305461847f8eSopenharmony_ci * @since 12 305561847f8eSopenharmony_ci */ 305661847f8eSopenharmony_ci clamp(value: ScopeType): ScopeType; 305761847f8eSopenharmony_ci } 305861847f8eSopenharmony_ci 305961847f8eSopenharmony_ci /** 306061847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated 306161847f8eSopenharmony_ci * u8 array using the Base64 encoding scheme. 306261847f8eSopenharmony_ci * 306361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 306461847f8eSopenharmony_ci * @since 8 306561847f8eSopenharmony_ci * @deprecated since 9 306661847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper 306761847f8eSopenharmony_ci */ 306861847f8eSopenharmony_ci class Base64 { 306961847f8eSopenharmony_ci /** 307061847f8eSopenharmony_ci * Constructor for creating base64 encoding and decoding 307161847f8eSopenharmony_ci * 307261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 307361847f8eSopenharmony_ci * @since 8 307461847f8eSopenharmony_ci * @deprecated since 9 307561847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.constructor 307661847f8eSopenharmony_ci */ 307761847f8eSopenharmony_ci constructor(); 307861847f8eSopenharmony_ci 307961847f8eSopenharmony_ci /** 308061847f8eSopenharmony_ci * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 308161847f8eSopenharmony_ci * 308261847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 308361847f8eSopenharmony_ci * @returns { Uint8Array } Return the encoded new Uint8Array. 308461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 308561847f8eSopenharmony_ci * @since 8 308661847f8eSopenharmony_ci * @deprecated since 9 308761847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.encodeSync 308861847f8eSopenharmony_ci */ 308961847f8eSopenharmony_ci encodeSync(src: Uint8Array): Uint8Array; 309061847f8eSopenharmony_ci 309161847f8eSopenharmony_ci /** 309261847f8eSopenharmony_ci * Encodes the specified byte array into a String using the Base64 encoding scheme. 309361847f8eSopenharmony_ci * 309461847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 309561847f8eSopenharmony_ci * @returns { string } Return the encoded string. 309661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 309761847f8eSopenharmony_ci * @since 8 309861847f8eSopenharmony_ci * @deprecated since 9 309961847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.encodeToStringSync 310061847f8eSopenharmony_ci */ 310161847f8eSopenharmony_ci encodeToStringSync(src: Uint8Array): string; 310261847f8eSopenharmony_ci 310361847f8eSopenharmony_ci /** 310461847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 310561847f8eSopenharmony_ci * 310661847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 310761847f8eSopenharmony_ci * @returns { Uint8Array } Return the decoded Uint8Array. 310861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 310961847f8eSopenharmony_ci * @since 8 311061847f8eSopenharmony_ci * @deprecated since 9 311161847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.decodeSync 311261847f8eSopenharmony_ci */ 311361847f8eSopenharmony_ci decodeSync(src: Uint8Array | string): Uint8Array; 311461847f8eSopenharmony_ci 311561847f8eSopenharmony_ci /** 311661847f8eSopenharmony_ci * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. 311761847f8eSopenharmony_ci * 311861847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 311961847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array. 312061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 312161847f8eSopenharmony_ci * @since 8 312261847f8eSopenharmony_ci * @deprecated since 9 312361847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.encode 312461847f8eSopenharmony_ci */ 312561847f8eSopenharmony_ci encode(src: Uint8Array): Promise<Uint8Array>; 312661847f8eSopenharmony_ci 312761847f8eSopenharmony_ci /** 312861847f8eSopenharmony_ci * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. 312961847f8eSopenharmony_ci * 313061847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 313161847f8eSopenharmony_ci * @returns { Promise<string> } Returns the encoded asynchronous string. 313261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 313361847f8eSopenharmony_ci * @since 8 313461847f8eSopenharmony_ci * @deprecated since 9 313561847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.encodeToString 313661847f8eSopenharmony_ci */ 313761847f8eSopenharmony_ci encodeToString(src: Uint8Array): Promise<string>; 313861847f8eSopenharmony_ci 313961847f8eSopenharmony_ci /** 314061847f8eSopenharmony_ci * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. 314161847f8eSopenharmony_ci * 314261847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 314361847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array. 314461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 314561847f8eSopenharmony_ci * @since 8 314661847f8eSopenharmony_ci * @deprecated since 9 314761847f8eSopenharmony_ci * @useinstead ohos.util.Base64Helper.decode 314861847f8eSopenharmony_ci */ 314961847f8eSopenharmony_ci decode(src: Uint8Array | string): Promise<Uint8Array>; 315061847f8eSopenharmony_ci } 315161847f8eSopenharmony_ci 315261847f8eSopenharmony_ci /** 315361847f8eSopenharmony_ci * The Type represents two different encoding formats for base64 315461847f8eSopenharmony_ci * 315561847f8eSopenharmony_ci * @enum { number } Type 315661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 315761847f8eSopenharmony_ci * @crossplatform 315861847f8eSopenharmony_ci * @since 10 315961847f8eSopenharmony_ci */ 316061847f8eSopenharmony_ci /** 316161847f8eSopenharmony_ci * The Type represents two different encoding formats for base64 316261847f8eSopenharmony_ci * 316361847f8eSopenharmony_ci * @enum { number } Type 316461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 316561847f8eSopenharmony_ci * @crossplatform 316661847f8eSopenharmony_ci * @atomicservice 316761847f8eSopenharmony_ci * @since 11 316861847f8eSopenharmony_ci */ 316961847f8eSopenharmony_ci /** 317061847f8eSopenharmony_ci * The Type represents four different encoding formats for base64 317161847f8eSopenharmony_ci * 317261847f8eSopenharmony_ci * @enum { number } Type 317361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 317461847f8eSopenharmony_ci * @crossplatform 317561847f8eSopenharmony_ci * @atomicservice 317661847f8eSopenharmony_ci * @since 12 317761847f8eSopenharmony_ci */ 317861847f8eSopenharmony_ci enum Type { 317961847f8eSopenharmony_ci /** 318061847f8eSopenharmony_ci * The value indicates that the encoding format of base64 is BASIC 318161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 318261847f8eSopenharmony_ci * @crossplatform 318361847f8eSopenharmony_ci * @since 10 318461847f8eSopenharmony_ci */ 318561847f8eSopenharmony_ci /** 318661847f8eSopenharmony_ci * The value indicates that the encoding format of base64 is BASIC 318761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 318861847f8eSopenharmony_ci * @crossplatform 318961847f8eSopenharmony_ci * @atomicservice 319061847f8eSopenharmony_ci * @since 11 319161847f8eSopenharmony_ci */ 319261847f8eSopenharmony_ci BASIC, 319361847f8eSopenharmony_ci /** 319461847f8eSopenharmony_ci * The value indicates that the encoding format of base64 is MIME 319561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 319661847f8eSopenharmony_ci * @crossplatform 319761847f8eSopenharmony_ci * @since 10 319861847f8eSopenharmony_ci */ 319961847f8eSopenharmony_ci /** 320061847f8eSopenharmony_ci * The value indicates that the encoding format of base64 is MIME 320161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 320261847f8eSopenharmony_ci * @crossplatform 320361847f8eSopenharmony_ci * @atomicservice 320461847f8eSopenharmony_ci * @since 11 320561847f8eSopenharmony_ci */ 320661847f8eSopenharmony_ci MIME, 320761847f8eSopenharmony_ci /** 320861847f8eSopenharmony_ci * The value indicates that the encoding format of base64 is BASIC_URL_SAFE 320961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 321061847f8eSopenharmony_ci * @crossplatform 321161847f8eSopenharmony_ci * @atomicservice 321261847f8eSopenharmony_ci * @since 12 321361847f8eSopenharmony_ci */ 321461847f8eSopenharmony_ci BASIC_URL_SAFE, 321561847f8eSopenharmony_ci /** 321661847f8eSopenharmony_ci * The value indicates that the encoding format of base64 is MIME_URL_SAFE 321761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 321861847f8eSopenharmony_ci * @crossplatform 321961847f8eSopenharmony_ci * @atomicservice 322061847f8eSopenharmony_ci * @since 12 322161847f8eSopenharmony_ci */ 322261847f8eSopenharmony_ci MIME_URL_SAFE 322361847f8eSopenharmony_ci } 322461847f8eSopenharmony_ci 322561847f8eSopenharmony_ci /** 322661847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated 322761847f8eSopenharmony_ci * u8 array using the Base64 encoding scheme. 322861847f8eSopenharmony_ci * 322961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 323061847f8eSopenharmony_ci * @since 9 323161847f8eSopenharmony_ci */ 323261847f8eSopenharmony_ci /** 323361847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated 323461847f8eSopenharmony_ci * u8 array using the Base64 encoding scheme. 323561847f8eSopenharmony_ci * 323661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 323761847f8eSopenharmony_ci * @crossplatform 323861847f8eSopenharmony_ci * @since 10 323961847f8eSopenharmony_ci */ 324061847f8eSopenharmony_ci /** 324161847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated 324261847f8eSopenharmony_ci * u8 array using the Base64 encoding scheme. 324361847f8eSopenharmony_ci * 324461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 324561847f8eSopenharmony_ci * @crossplatform 324661847f8eSopenharmony_ci * @atomicservice 324761847f8eSopenharmony_ci * @since 11 324861847f8eSopenharmony_ci */ 324961847f8eSopenharmony_ci class Base64Helper { 325061847f8eSopenharmony_ci /** 325161847f8eSopenharmony_ci * Constructor for creating base64 encoding and decoding 325261847f8eSopenharmony_ci * 325361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 325461847f8eSopenharmony_ci * @since 9 325561847f8eSopenharmony_ci */ 325661847f8eSopenharmony_ci /** 325761847f8eSopenharmony_ci * Constructor for creating base64 encoding and decoding 325861847f8eSopenharmony_ci * 325961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 326061847f8eSopenharmony_ci * @crossplatform 326161847f8eSopenharmony_ci * @since 10 326261847f8eSopenharmony_ci */ 326361847f8eSopenharmony_ci /** 326461847f8eSopenharmony_ci * Constructor for creating base64 encoding and decoding 326561847f8eSopenharmony_ci * 326661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 326761847f8eSopenharmony_ci * @crossplatform 326861847f8eSopenharmony_ci * @atomicservice 326961847f8eSopenharmony_ci * @since 11 327061847f8eSopenharmony_ci */ 327161847f8eSopenharmony_ci constructor(); 327261847f8eSopenharmony_ci 327361847f8eSopenharmony_ci /** 327461847f8eSopenharmony_ci * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 327561847f8eSopenharmony_ci * 327661847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 327761847f8eSopenharmony_ci * @returns { Uint8Array } Return the encoded new Uint8Array. 327861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 327961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 328061847f8eSopenharmony_ci * 2.Incorrect parameter types. 328161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 328261847f8eSopenharmony_ci * @since 9 328361847f8eSopenharmony_ci */ 328461847f8eSopenharmony_ci /** 328561847f8eSopenharmony_ci * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 328661847f8eSopenharmony_ci * 328761847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 328861847f8eSopenharmony_ci * @returns { Uint8Array } Return the encoded new Uint8Array. 328961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 329061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 329161847f8eSopenharmony_ci * 2.Incorrect parameter types. 329261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 329361847f8eSopenharmony_ci * @crossplatform 329461847f8eSopenharmony_ci * @since 10 329561847f8eSopenharmony_ci */ 329661847f8eSopenharmony_ci /** 329761847f8eSopenharmony_ci * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 329861847f8eSopenharmony_ci * 329961847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 330061847f8eSopenharmony_ci * @returns { Uint8Array } Return the encoded new Uint8Array. 330161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 330261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 330361847f8eSopenharmony_ci * 2.Incorrect parameter types. 330461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 330561847f8eSopenharmony_ci * @crossplatform 330661847f8eSopenharmony_ci * @atomicservice 330761847f8eSopenharmony_ci * @since 11 330861847f8eSopenharmony_ci */ 330961847f8eSopenharmony_ci /** 331061847f8eSopenharmony_ci * Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 331161847f8eSopenharmony_ci * 331261847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 331361847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and BASIC_URL_SAFE 331461847f8eSopenharmony_ci * @returns { Uint8Array } Return the encoded new Uint8Array. 331561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 331661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 331761847f8eSopenharmony_ci * 2.Incorrect parameter types. 331861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 331961847f8eSopenharmony_ci * @crossplatform 332061847f8eSopenharmony_ci * @atomicservice 332161847f8eSopenharmony_ci * @since 12 332261847f8eSopenharmony_ci */ 332361847f8eSopenharmony_ci encodeSync(src: Uint8Array, options?: Type): Uint8Array; 332461847f8eSopenharmony_ci 332561847f8eSopenharmony_ci /** 332661847f8eSopenharmony_ci * Encodes the specified byte array into a String using the Base64 encoding scheme. 332761847f8eSopenharmony_ci * 332861847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 332961847f8eSopenharmony_ci * @returns { string } Return the encoded string. 333061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 333161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 333261847f8eSopenharmony_ci * 2.Incorrect parameter types. 333361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 333461847f8eSopenharmony_ci * @since 9 333561847f8eSopenharmony_ci */ 333661847f8eSopenharmony_ci /** 333761847f8eSopenharmony_ci * Encodes the specified byte array into a String using the Base64 encoding scheme. 333861847f8eSopenharmony_ci * 333961847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 334061847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME 334161847f8eSopenharmony_ci * @returns { string } Return the encoded string. 334261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 334361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 334461847f8eSopenharmony_ci * 2.Incorrect parameter types. 334561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 334661847f8eSopenharmony_ci * @crossplatform 334761847f8eSopenharmony_ci * @since 10 334861847f8eSopenharmony_ci */ 334961847f8eSopenharmony_ci /** 335061847f8eSopenharmony_ci * Encodes the specified byte array into a String using the Base64 encoding scheme. 335161847f8eSopenharmony_ci * 335261847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 335361847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME 335461847f8eSopenharmony_ci * @returns { string } Return the encoded string. 335561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 335661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 335761847f8eSopenharmony_ci * 2.Incorrect parameter types. 335861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 335961847f8eSopenharmony_ci * @crossplatform 336061847f8eSopenharmony_ci * @atomicservice 336161847f8eSopenharmony_ci * @since 11 336261847f8eSopenharmony_ci */ 336361847f8eSopenharmony_ci /** 336461847f8eSopenharmony_ci * Encodes the specified byte array into a String using the Base64 encoding scheme. 336561847f8eSopenharmony_ci * 336661847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 336761847f8eSopenharmony_ci * @param { Type } options - one of the Type enumeration 336861847f8eSopenharmony_ci * @returns { string } Return the encoded string. 336961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 337061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 337161847f8eSopenharmony_ci * 2.Incorrect parameter types. 337261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 337361847f8eSopenharmony_ci * @crossplatform 337461847f8eSopenharmony_ci * @atomicservice 337561847f8eSopenharmony_ci * @since 12 337661847f8eSopenharmony_ci */ 337761847f8eSopenharmony_ci encodeToStringSync(src: Uint8Array, options?: Type): string; 337861847f8eSopenharmony_ci 337961847f8eSopenharmony_ci /** 338061847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 338161847f8eSopenharmony_ci * 338261847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 338361847f8eSopenharmony_ci * @returns { Uint8Array } Return the decoded Uint8Array. 338461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 338561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 338661847f8eSopenharmony_ci * 2.Incorrect parameter types. 338761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 338861847f8eSopenharmony_ci * @since 9 338961847f8eSopenharmony_ci */ 339061847f8eSopenharmony_ci /** 339161847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 339261847f8eSopenharmony_ci * 339361847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 339461847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME 339561847f8eSopenharmony_ci * @returns { Uint8Array } Return the decoded Uint8Array. 339661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 339761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 339861847f8eSopenharmony_ci * 2.Incorrect parameter types. 339961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 340061847f8eSopenharmony_ci * @crossplatform 340161847f8eSopenharmony_ci * @since 10 340261847f8eSopenharmony_ci */ 340361847f8eSopenharmony_ci /** 340461847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 340561847f8eSopenharmony_ci * 340661847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 340761847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME 340861847f8eSopenharmony_ci * @returns { Uint8Array } Return the decoded Uint8Array. 340961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 341061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 341161847f8eSopenharmony_ci * 2.Incorrect parameter types. 341261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 341361847f8eSopenharmony_ci * @crossplatform 341461847f8eSopenharmony_ci * @atomicservice 341561847f8eSopenharmony_ci * @since 11 341661847f8eSopenharmony_ci */ 341761847f8eSopenharmony_ci /** 341861847f8eSopenharmony_ci * Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. 341961847f8eSopenharmony_ci * 342061847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 342161847f8eSopenharmony_ci * @param { Type } [options] - one of the Type enumeration 342261847f8eSopenharmony_ci * @returns { Uint8Array } Return the decoded Uint8Array. 342361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 342461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 342561847f8eSopenharmony_ci * 2.Incorrect parameter types. 342661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 342761847f8eSopenharmony_ci * @crossplatform 342861847f8eSopenharmony_ci * @atomicservice 342961847f8eSopenharmony_ci * @since 12 343061847f8eSopenharmony_ci */ 343161847f8eSopenharmony_ci decodeSync(src: Uint8Array | string, options?: Type): Uint8Array; 343261847f8eSopenharmony_ci 343361847f8eSopenharmony_ci /** 343461847f8eSopenharmony_ci * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. 343561847f8eSopenharmony_ci * 343661847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 343761847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array. 343861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 343961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 344061847f8eSopenharmony_ci * 2.Incorrect parameter types. 344161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 344261847f8eSopenharmony_ci * @since 9 344361847f8eSopenharmony_ci */ 344461847f8eSopenharmony_ci /** 344561847f8eSopenharmony_ci * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. 344661847f8eSopenharmony_ci * 344761847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 344861847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array. 344961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 345061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 345161847f8eSopenharmony_ci * 2.Incorrect parameter types. 345261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 345361847f8eSopenharmony_ci * @crossplatform 345461847f8eSopenharmony_ci * @since 10 345561847f8eSopenharmony_ci */ 345661847f8eSopenharmony_ci /** 345761847f8eSopenharmony_ci * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. 345861847f8eSopenharmony_ci * 345961847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 346061847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array. 346161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 346261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 346361847f8eSopenharmony_ci * 2.Incorrect parameter types. 346461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 346561847f8eSopenharmony_ci * @crossplatform 346661847f8eSopenharmony_ci * @atomicservice 346761847f8eSopenharmony_ci * @since 11 346861847f8eSopenharmony_ci */ 346961847f8eSopenharmony_ci /** 347061847f8eSopenharmony_ci * Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. 347161847f8eSopenharmony_ci * 347261847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 347361847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and BASIC_URL_SAFE 347461847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array. 347561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 347661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 347761847f8eSopenharmony_ci * 2.Incorrect parameter types. 347861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 347961847f8eSopenharmony_ci * @crossplatform 348061847f8eSopenharmony_ci * @atomicservice 348161847f8eSopenharmony_ci * @since 12 348261847f8eSopenharmony_ci */ 348361847f8eSopenharmony_ci encode(src: Uint8Array, options?: Type): Promise<Uint8Array>; 348461847f8eSopenharmony_ci 348561847f8eSopenharmony_ci /** 348661847f8eSopenharmony_ci * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. 348761847f8eSopenharmony_ci * 348861847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 348961847f8eSopenharmony_ci * @returns { Promise<string> } Returns the encoded asynchronous string. 349061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 349161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 349261847f8eSopenharmony_ci * 2.Incorrect parameter types. 349361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 349461847f8eSopenharmony_ci * @since 9 349561847f8eSopenharmony_ci */ 349661847f8eSopenharmony_ci /** 349761847f8eSopenharmony_ci * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. 349861847f8eSopenharmony_ci * 349961847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 350061847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME 350161847f8eSopenharmony_ci * @returns { Promise<string> } Returns the encoded asynchronous string. 350261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 350361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 350461847f8eSopenharmony_ci * 2.Incorrect parameter types. 350561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 350661847f8eSopenharmony_ci * @crossplatform 350761847f8eSopenharmony_ci * @since 10 350861847f8eSopenharmony_ci */ 350961847f8eSopenharmony_ci /** 351061847f8eSopenharmony_ci * Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. 351161847f8eSopenharmony_ci * 351261847f8eSopenharmony_ci * @param { Uint8Array } src - A Uint8Array value 351361847f8eSopenharmony_ci * @param { Type } [options] - one of the Type enumeration 351461847f8eSopenharmony_ci * @returns { Promise<string> } Returns the encoded asynchronous string. 351561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 351661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 351761847f8eSopenharmony_ci * 2.Incorrect parameter types. 351861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 351961847f8eSopenharmony_ci * @crossplatform 352061847f8eSopenharmony_ci * @atomicservice 352161847f8eSopenharmony_ci * @since 12 352261847f8eSopenharmony_ci */ 352361847f8eSopenharmony_ci encodeToString(src: Uint8Array, options?: Type): Promise<string>; 352461847f8eSopenharmony_ci 352561847f8eSopenharmony_ci /** 352661847f8eSopenharmony_ci * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or 352761847f8eSopenharmony_ci * input u8 array into a newly allocated u8 array. 352861847f8eSopenharmony_ci * 352961847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 353061847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array. 353161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 353261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 353361847f8eSopenharmony_ci * 2.Incorrect parameter types. 353461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 353561847f8eSopenharmony_ci * @since 9 353661847f8eSopenharmony_ci */ 353761847f8eSopenharmony_ci /** 353861847f8eSopenharmony_ci * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or 353961847f8eSopenharmony_ci * input u8 array into a newly allocated u8 array. 354061847f8eSopenharmony_ci * 354161847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 354261847f8eSopenharmony_ci * @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME 354361847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array. 354461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 354561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 354661847f8eSopenharmony_ci * 2.Incorrect parameter types. 354761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 354861847f8eSopenharmony_ci * @crossplatform 354961847f8eSopenharmony_ci * @since 10 355061847f8eSopenharmony_ci */ 355161847f8eSopenharmony_ci /** 355261847f8eSopenharmony_ci * Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or 355361847f8eSopenharmony_ci * input u8 array into a newly allocated u8 array. 355461847f8eSopenharmony_ci * 355561847f8eSopenharmony_ci * @param { Uint8Array | string } src - A Uint8Array value or value A string value 355661847f8eSopenharmony_ci * @param { Type } [options] - one of the Type enumeration 355761847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array. 355861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 355961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 356061847f8eSopenharmony_ci * 2.Incorrect parameter types. 356161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 356261847f8eSopenharmony_ci * @crossplatform 356361847f8eSopenharmony_ci * @atomicservice 356461847f8eSopenharmony_ci * @since 12 356561847f8eSopenharmony_ci */ 356661847f8eSopenharmony_ci decode(src: Uint8Array | string, options?: Type): Promise<Uint8Array>; 356761847f8eSopenharmony_ci } 356861847f8eSopenharmony_ci 356961847f8eSopenharmony_ci /** 357061847f8eSopenharmony_ci * Check the type of parameter. 357161847f8eSopenharmony_ci * 357261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 357361847f8eSopenharmony_ci * @since 8 357461847f8eSopenharmony_ci */ 357561847f8eSopenharmony_ci /** 357661847f8eSopenharmony_ci * Check the type of parameter. 357761847f8eSopenharmony_ci * 357861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 357961847f8eSopenharmony_ci * @crossplatform 358061847f8eSopenharmony_ci * @since 10 358161847f8eSopenharmony_ci */ 358261847f8eSopenharmony_ci /** 358361847f8eSopenharmony_ci * Check the type of parameter. 358461847f8eSopenharmony_ci * 358561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 358661847f8eSopenharmony_ci * @crossplatform 358761847f8eSopenharmony_ci * @atomicservice 358861847f8eSopenharmony_ci * @since 12 358961847f8eSopenharmony_ci */ 359061847f8eSopenharmony_ci class types { 359161847f8eSopenharmony_ci /** 359261847f8eSopenharmony_ci * The types constructor 359361847f8eSopenharmony_ci * 359461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 359561847f8eSopenharmony_ci * @since 8 359661847f8eSopenharmony_ci */ 359761847f8eSopenharmony_ci /** 359861847f8eSopenharmony_ci * The types constructor 359961847f8eSopenharmony_ci * 360061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 360161847f8eSopenharmony_ci * @crossplatform 360261847f8eSopenharmony_ci * @since 10 360361847f8eSopenharmony_ci */ 360461847f8eSopenharmony_ci /** 360561847f8eSopenharmony_ci * The types constructor 360661847f8eSopenharmony_ci * 360761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 360861847f8eSopenharmony_ci * @crossplatform 360961847f8eSopenharmony_ci * @atomicservice 361061847f8eSopenharmony_ci * @since 12 361161847f8eSopenharmony_ci */ 361261847f8eSopenharmony_ci constructor(); 361361847f8eSopenharmony_ci /** 361461847f8eSopenharmony_ci * Check whether the entered value is of arraybuffer or sharedarraybuffer type. 361561847f8eSopenharmony_ci * 361661847f8eSopenharmony_ci * @param { Object } value - A ArrayBuffer or SharedArrayBuffer value 361761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance. 361861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 361961847f8eSopenharmony_ci * @since 8 362061847f8eSopenharmony_ci */ 362161847f8eSopenharmony_ci /** 362261847f8eSopenharmony_ci * Check whether the entered value is of arraybuffer or sharedarraybuffer type. 362361847f8eSopenharmony_ci * 362461847f8eSopenharmony_ci * @param { Object } value - A ArrayBuffer or SharedArrayBuffer value 362561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance. 362661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 362761847f8eSopenharmony_ci * @crossplatform 362861847f8eSopenharmony_ci * @since 10 362961847f8eSopenharmony_ci */ 363061847f8eSopenharmony_ci /** 363161847f8eSopenharmony_ci * Check whether the entered value is of arraybuffer or sharedarraybuffer type. 363261847f8eSopenharmony_ci * 363361847f8eSopenharmony_ci * @param { Object } value - A ArrayBuffer or SharedArrayBuffer value 363461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in ArrayBuffer or SharedArrayBuffer instance. 363561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 363661847f8eSopenharmony_ci * @crossplatform 363761847f8eSopenharmony_ci * @atomicservice 363861847f8eSopenharmony_ci * @since 12 363961847f8eSopenharmony_ci */ 364061847f8eSopenharmony_ci isAnyArrayBuffer(value: Object): boolean; 364161847f8eSopenharmony_ci /** 364261847f8eSopenharmony_ci * Check whether the type is included in the isAnyArrayBuffer. 364361847f8eSopenharmony_ci * 364461847f8eSopenharmony_ci * @param { Object } value - A included in the isAnyArrayBuffer value 364561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of one of the ArrayBuffer views, 364661847f8eSopenharmony_ci * such as typed array objects or DataView. 364761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 364861847f8eSopenharmony_ci * @since 8 364961847f8eSopenharmony_ci */ 365061847f8eSopenharmony_ci /** 365161847f8eSopenharmony_ci * Check whether the type is included in the isAnyArrayBuffer. 365261847f8eSopenharmony_ci * 365361847f8eSopenharmony_ci * @param { Object } value - A included in the isAnyArrayBuffer value 365461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of one of the ArrayBuffer views, 365561847f8eSopenharmony_ci * such as typed array objects or DataView. 365661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 365761847f8eSopenharmony_ci * @crossplatform 365861847f8eSopenharmony_ci * @since 10 365961847f8eSopenharmony_ci */ 366061847f8eSopenharmony_ci /** 366161847f8eSopenharmony_ci * Check whether the type is included in the isAnyArrayBuffer. 366261847f8eSopenharmony_ci * 366361847f8eSopenharmony_ci * @param { Object } value - A included in the isAnyArrayBuffer value 366461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of one of the ArrayBuffer views, 366561847f8eSopenharmony_ci * such as typed array objects or DataView. 366661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 366761847f8eSopenharmony_ci * @crossplatform 366861847f8eSopenharmony_ci * @atomicservice 366961847f8eSopenharmony_ci * @since 12 367061847f8eSopenharmony_ci */ 367161847f8eSopenharmony_ci isArrayBufferView(value: Object): boolean; 367261847f8eSopenharmony_ci /** 367361847f8eSopenharmony_ci * Check whether the entered value is an arguments object type. 367461847f8eSopenharmony_ci * 367561847f8eSopenharmony_ci * @param { Object } value - A arguments value 367661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an arguments object. 367761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 367861847f8eSopenharmony_ci * @since 8 367961847f8eSopenharmony_ci */ 368061847f8eSopenharmony_ci /** 368161847f8eSopenharmony_ci * Check whether the entered value is an arguments object type. 368261847f8eSopenharmony_ci * 368361847f8eSopenharmony_ci * @param { Object } value - A arguments value 368461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an arguments object. 368561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 368661847f8eSopenharmony_ci * @crossplatform 368761847f8eSopenharmony_ci * @since 10 368861847f8eSopenharmony_ci */ 368961847f8eSopenharmony_ci /** 369061847f8eSopenharmony_ci * Check whether the entered value is an arguments object type. 369161847f8eSopenharmony_ci * 369261847f8eSopenharmony_ci * @param { Object } value - A arguments value 369361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an arguments object. 369461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 369561847f8eSopenharmony_ci * @crossplatform 369661847f8eSopenharmony_ci * @atomicservice 369761847f8eSopenharmony_ci * @since 12 369861847f8eSopenharmony_ci */ 369961847f8eSopenharmony_ci isArgumentsObject(value: Object): boolean; 370061847f8eSopenharmony_ci /** 370161847f8eSopenharmony_ci * Check whether the entered value is of arraybuffer type. 370261847f8eSopenharmony_ci * 370361847f8eSopenharmony_ci * @param { Object } value - A arraybuffer value 370461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances. 370561847f8eSopenharmony_ci * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that. 370661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 370761847f8eSopenharmony_ci * @since 8 370861847f8eSopenharmony_ci */ 370961847f8eSopenharmony_ci /** 371061847f8eSopenharmony_ci * Check whether the entered value is of arraybuffer type. 371161847f8eSopenharmony_ci * 371261847f8eSopenharmony_ci * @param { Object } value - A arraybuffer value 371361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances. 371461847f8eSopenharmony_ci * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that. 371561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 371661847f8eSopenharmony_ci * @crossplatform 371761847f8eSopenharmony_ci * @since 10 371861847f8eSopenharmony_ci */ 371961847f8eSopenharmony_ci /** 372061847f8eSopenharmony_ci * Check whether the entered value is of arraybuffer type. 372161847f8eSopenharmony_ci * 372261847f8eSopenharmony_ci * @param { Object } value - A arraybuffer value 372361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances. 372461847f8eSopenharmony_ci * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that. 372561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 372661847f8eSopenharmony_ci * @crossplatform 372761847f8eSopenharmony_ci * @atomicservice 372861847f8eSopenharmony_ci * @since 12 372961847f8eSopenharmony_ci */ 373061847f8eSopenharmony_ci isArrayBuffer(value: Object): boolean; 373161847f8eSopenharmony_ci /** 373261847f8eSopenharmony_ci * Check whether the value entered is an asynchronous function type. 373361847f8eSopenharmony_ci * 373461847f8eSopenharmony_ci * @param { Object } value - A async function value 373561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing; 373661847f8eSopenharmony_ci * in particular, the return value may not match the original source code if a transpilation tool was used. 373761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 373861847f8eSopenharmony_ci * @since 8 373961847f8eSopenharmony_ci */ 374061847f8eSopenharmony_ci /** 374161847f8eSopenharmony_ci * Check whether the value entered is an asynchronous function type. 374261847f8eSopenharmony_ci * 374361847f8eSopenharmony_ci * @param { Object } value - A async function value 374461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing; 374561847f8eSopenharmony_ci * in particular, the return value may not match the original source code if a transpilation tool was used. 374661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 374761847f8eSopenharmony_ci * @crossplatform 374861847f8eSopenharmony_ci * @since 10 374961847f8eSopenharmony_ci */ 375061847f8eSopenharmony_ci /** 375161847f8eSopenharmony_ci * Check whether the value entered is an asynchronous function type. 375261847f8eSopenharmony_ci * 375361847f8eSopenharmony_ci * @param { Object } value - A async function value 375461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing; 375561847f8eSopenharmony_ci * in particular, the return value may not match the original source code if a transpilation tool was used. 375661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 375761847f8eSopenharmony_ci * @crossplatform 375861847f8eSopenharmony_ci * @atomicservice 375961847f8eSopenharmony_ci * @since 12 376061847f8eSopenharmony_ci */ 376161847f8eSopenharmony_ci isAsyncFunction(value: Object): boolean; 376261847f8eSopenharmony_ci /** 376361847f8eSopenharmony_ci * Check whether the entered value is of bigint64array array type. 376461847f8eSopenharmony_ci * 376561847f8eSopenharmony_ci * @param { Object } value - A BigInt64Array value 376661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a BigInt64Array instance. 376761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 376861847f8eSopenharmony_ci * @since 8 376961847f8eSopenharmony_ci */ 377061847f8eSopenharmony_ci /** 377161847f8eSopenharmony_ci * Check whether the entered value is of bigint64array array type. 377261847f8eSopenharmony_ci * 377361847f8eSopenharmony_ci * @param { Object } value - A BigInt64Array value 377461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a BigInt64Array instance. 377561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 377661847f8eSopenharmony_ci * @crossplatform 377761847f8eSopenharmony_ci * @since 10 377861847f8eSopenharmony_ci */ 377961847f8eSopenharmony_ci /** 378061847f8eSopenharmony_ci * Check whether the entered value is of bigint64array array type. 378161847f8eSopenharmony_ci * 378261847f8eSopenharmony_ci * @param { Object } value - A BigInt64Array value 378361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a BigInt64Array instance. 378461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 378561847f8eSopenharmony_ci * @crossplatform 378661847f8eSopenharmony_ci * @atomicservice 378761847f8eSopenharmony_ci * @since 12 378861847f8eSopenharmony_ci */ 378961847f8eSopenharmony_ci isBigInt64Array(value: Object): boolean; 379061847f8eSopenharmony_ci /** 379161847f8eSopenharmony_ci * Check whether the entered value is of biguint64array array array type. 379261847f8eSopenharmony_ci * 379361847f8eSopenharmony_ci * @param { Object } value - A BigUint64Array value 379461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a BigUint64Array instance. 379561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 379661847f8eSopenharmony_ci * @since 8 379761847f8eSopenharmony_ci */ 379861847f8eSopenharmony_ci /** 379961847f8eSopenharmony_ci * Check whether the entered value is of biguint64array array array type. 380061847f8eSopenharmony_ci * 380161847f8eSopenharmony_ci * @param { Object } value - A BigUint64Array value 380261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a BigUint64Array instance. 380361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 380461847f8eSopenharmony_ci * @crossplatform 380561847f8eSopenharmony_ci * @since 10 380661847f8eSopenharmony_ci */ 380761847f8eSopenharmony_ci /** 380861847f8eSopenharmony_ci * Check whether the entered value is of biguint64array array array type. 380961847f8eSopenharmony_ci * 381061847f8eSopenharmony_ci * @param { Object } value - A BigUint64Array value 381161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a BigUint64Array instance. 381261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 381361847f8eSopenharmony_ci * @crossplatform 381461847f8eSopenharmony_ci * @atomicservice 381561847f8eSopenharmony_ci * @since 12 381661847f8eSopenharmony_ci */ 381761847f8eSopenharmony_ci isBigUint64Array(value: Object): boolean; 381861847f8eSopenharmony_ci /** 381961847f8eSopenharmony_ci * Check whether the entered value is a Boolean object type. 382061847f8eSopenharmony_ci * 382161847f8eSopenharmony_ci * @param { Object } value - A boolean object value 382261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a boolean object, e.g. created by new Boolean(). 382361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 382461847f8eSopenharmony_ci * @since 8 382561847f8eSopenharmony_ci */ 382661847f8eSopenharmony_ci /** 382761847f8eSopenharmony_ci * Check whether the entered value is a Boolean object type. 382861847f8eSopenharmony_ci * 382961847f8eSopenharmony_ci * @param { Object } value - A boolean object value 383061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a boolean object, e.g. created by new Boolean(). 383161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 383261847f8eSopenharmony_ci * @crossplatform 383361847f8eSopenharmony_ci * @since 10 383461847f8eSopenharmony_ci */ 383561847f8eSopenharmony_ci /** 383661847f8eSopenharmony_ci * Check whether the entered value is a Boolean object type. 383761847f8eSopenharmony_ci * 383861847f8eSopenharmony_ci * @param { Object } value - A boolean object value 383961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a boolean object, e.g. created by new Boolean(). 384061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 384161847f8eSopenharmony_ci * @crossplatform 384261847f8eSopenharmony_ci * @atomicservice 384361847f8eSopenharmony_ci * @since 12 384461847f8eSopenharmony_ci */ 384561847f8eSopenharmony_ci isBooleanObject(value: Object): boolean; 384661847f8eSopenharmony_ci /** 384761847f8eSopenharmony_ci * Check whether the entered value is a Boolean or number or string or symbol object type. 384861847f8eSopenharmony_ci * 384961847f8eSopenharmony_ci * @param { Object } value - A boxed primitive object value 385061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()). 385161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 385261847f8eSopenharmony_ci * @since 8 385361847f8eSopenharmony_ci */ 385461847f8eSopenharmony_ci /** 385561847f8eSopenharmony_ci * Check whether the entered value is a Boolean or number or string or symbol object type. 385661847f8eSopenharmony_ci * 385761847f8eSopenharmony_ci * @param { Object } value - A boxed primitive object value 385861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()). 385961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 386061847f8eSopenharmony_ci * @crossplatform 386161847f8eSopenharmony_ci * @since 10 386261847f8eSopenharmony_ci */ 386361847f8eSopenharmony_ci /** 386461847f8eSopenharmony_ci * Check whether the entered value is a Boolean or number or string or symbol object type. 386561847f8eSopenharmony_ci * 386661847f8eSopenharmony_ci * @param { Object } value - A boxed primitive object value 386761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is any boxed primitive object, e.g. created by new Boolean(), new String() or Object(Symbol()). 386861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 386961847f8eSopenharmony_ci * @crossplatform 387061847f8eSopenharmony_ci * @atomicservice 387161847f8eSopenharmony_ci * @since 12 387261847f8eSopenharmony_ci */ 387361847f8eSopenharmony_ci isBoxedPrimitive(value: Object): boolean; 387461847f8eSopenharmony_ci /** 387561847f8eSopenharmony_ci * Check whether the entered value is of DataView type. 387661847f8eSopenharmony_ci * 387761847f8eSopenharmony_ci * @param { Object } value - A DataView value 387861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in DataView instance. 387961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 388061847f8eSopenharmony_ci * @since 8 388161847f8eSopenharmony_ci */ 388261847f8eSopenharmony_ci /** 388361847f8eSopenharmony_ci * Check whether the entered value is of DataView type. 388461847f8eSopenharmony_ci * 388561847f8eSopenharmony_ci * @param { Object } value - A DataView value 388661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in DataView instance. 388761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 388861847f8eSopenharmony_ci * @crossplatform 388961847f8eSopenharmony_ci * @since 10 389061847f8eSopenharmony_ci */ 389161847f8eSopenharmony_ci /** 389261847f8eSopenharmony_ci * Check whether the entered value is of DataView type. 389361847f8eSopenharmony_ci * 389461847f8eSopenharmony_ci * @param { Object } value - A DataView value 389561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in DataView instance. 389661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 389761847f8eSopenharmony_ci * @crossplatform 389861847f8eSopenharmony_ci * @atomicservice 389961847f8eSopenharmony_ci * @since 12 390061847f8eSopenharmony_ci */ 390161847f8eSopenharmony_ci isDataView(value: Object): boolean; 390261847f8eSopenharmony_ci /** 390361847f8eSopenharmony_ci * Check whether the entered value is of type date. 390461847f8eSopenharmony_ci * 390561847f8eSopenharmony_ci * @param { Object } value - A Date value 390661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Date instance. 390761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 390861847f8eSopenharmony_ci * @since 8 390961847f8eSopenharmony_ci */ 391061847f8eSopenharmony_ci /** 391161847f8eSopenharmony_ci * Check whether the entered value is of type date. 391261847f8eSopenharmony_ci * 391361847f8eSopenharmony_ci * @param { Object } value - A Date value 391461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Date instance. 391561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 391661847f8eSopenharmony_ci * @crossplatform 391761847f8eSopenharmony_ci * @since 10 391861847f8eSopenharmony_ci */ 391961847f8eSopenharmony_ci /** 392061847f8eSopenharmony_ci * Check whether the entered value is of type date. 392161847f8eSopenharmony_ci * 392261847f8eSopenharmony_ci * @param { Object } value - A Date value 392361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Date instance. 392461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 392561847f8eSopenharmony_ci * @crossplatform 392661847f8eSopenharmony_ci * @atomicservice 392761847f8eSopenharmony_ci * @since 12 392861847f8eSopenharmony_ci */ 392961847f8eSopenharmony_ci isDate(value: Object): boolean; 393061847f8eSopenharmony_ci /** 393161847f8eSopenharmony_ci * Check whether the entered value is a native external value type. 393261847f8eSopenharmony_ci * 393361847f8eSopenharmony_ci * @param { Object } value - A External value 393461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a native External value. 393561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 393661847f8eSopenharmony_ci * @since 8 393761847f8eSopenharmony_ci */ 393861847f8eSopenharmony_ci /** 393961847f8eSopenharmony_ci * Check whether the entered value is a native external value type. 394061847f8eSopenharmony_ci * 394161847f8eSopenharmony_ci * @param { Object } value - A External value 394261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a native External value. 394361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 394461847f8eSopenharmony_ci * @crossplatform 394561847f8eSopenharmony_ci * @since 10 394661847f8eSopenharmony_ci */ 394761847f8eSopenharmony_ci /** 394861847f8eSopenharmony_ci * Check whether the entered value is a native external value type. 394961847f8eSopenharmony_ci * 395061847f8eSopenharmony_ci * @param { Object } value - A External value 395161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a native External value. 395261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 395361847f8eSopenharmony_ci * @crossplatform 395461847f8eSopenharmony_ci * @atomicservice 395561847f8eSopenharmony_ci * @since 12 395661847f8eSopenharmony_ci */ 395761847f8eSopenharmony_ci isExternal(value: Object): boolean; 395861847f8eSopenharmony_ci /** 395961847f8eSopenharmony_ci * Check whether the entered value is of float32array array type. 396061847f8eSopenharmony_ci * 396161847f8eSopenharmony_ci * @param { Object } value - A Float32Array value 396261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Float32Array instance. 396361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 396461847f8eSopenharmony_ci * @since 8 396561847f8eSopenharmony_ci */ 396661847f8eSopenharmony_ci /** 396761847f8eSopenharmony_ci * Check whether the entered value is of float32array array type. 396861847f8eSopenharmony_ci * 396961847f8eSopenharmony_ci * @param { Object } value - A Float32Array value 397061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Float32Array instance. 397161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 397261847f8eSopenharmony_ci * @crossplatform 397361847f8eSopenharmony_ci * @since 10 397461847f8eSopenharmony_ci */ 397561847f8eSopenharmony_ci /** 397661847f8eSopenharmony_ci * Check whether the entered value is of float32array array type. 397761847f8eSopenharmony_ci * 397861847f8eSopenharmony_ci * @param { Object } value - A Float32Array value 397961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Float32Array instance. 398061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 398161847f8eSopenharmony_ci * @crossplatform 398261847f8eSopenharmony_ci * @atomicservice 398361847f8eSopenharmony_ci * @since 12 398461847f8eSopenharmony_ci */ 398561847f8eSopenharmony_ci isFloat32Array(value: Object): boolean; 398661847f8eSopenharmony_ci /** 398761847f8eSopenharmony_ci * Check whether the entered value is of float64array array type. 398861847f8eSopenharmony_ci * 398961847f8eSopenharmony_ci * @param { Object } value - A Float64Array value 399061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Float64Array instance. 399161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 399261847f8eSopenharmony_ci * @since 8 399361847f8eSopenharmony_ci */ 399461847f8eSopenharmony_ci /** 399561847f8eSopenharmony_ci * Check whether the entered value is of float64array array type. 399661847f8eSopenharmony_ci * 399761847f8eSopenharmony_ci * @param { Object } value - A Float64Array value 399861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Float64Array instance. 399961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 400061847f8eSopenharmony_ci * @crossplatform 400161847f8eSopenharmony_ci * @since 10 400261847f8eSopenharmony_ci */ 400361847f8eSopenharmony_ci /** 400461847f8eSopenharmony_ci * Check whether the entered value is of float64array array type. 400561847f8eSopenharmony_ci * 400661847f8eSopenharmony_ci * @param { Object } value - A Float64Array value 400761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Float64Array instance. 400861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 400961847f8eSopenharmony_ci * @crossplatform 401061847f8eSopenharmony_ci * @atomicservice 401161847f8eSopenharmony_ci * @since 12 401261847f8eSopenharmony_ci */ 401361847f8eSopenharmony_ci isFloat64Array(value: Object): boolean; 401461847f8eSopenharmony_ci /** 401561847f8eSopenharmony_ci * Check whether the input value is a generator function type. 401661847f8eSopenharmony_ci * 401761847f8eSopenharmony_ci * @param { Object } value - A generator function value 401861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular, 401961847f8eSopenharmony_ci * the return value may not match the original source code if a transpilation tool was used. 402061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 402161847f8eSopenharmony_ci * @since 8 402261847f8eSopenharmony_ci */ 402361847f8eSopenharmony_ci /** 402461847f8eSopenharmony_ci * Check whether the input value is a generator function type. 402561847f8eSopenharmony_ci * 402661847f8eSopenharmony_ci * @param { Object } value - A generator function value 402761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular, 402861847f8eSopenharmony_ci * the return value may not match the original source code if a transpilation tool was used. 402961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 403061847f8eSopenharmony_ci * @crossplatform 403161847f8eSopenharmony_ci * @since 10 403261847f8eSopenharmony_ci */ 403361847f8eSopenharmony_ci /** 403461847f8eSopenharmony_ci * Check whether the input value is a generator function type. 403561847f8eSopenharmony_ci * 403661847f8eSopenharmony_ci * @param { Object } value - A generator function value 403761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a generator function. This only reports back what the JavaScript engine is seeing; in particular, 403861847f8eSopenharmony_ci * the return value may not match the original source code if a transpilation tool was used. 403961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 404061847f8eSopenharmony_ci * @crossplatform 404161847f8eSopenharmony_ci * @atomicservice 404261847f8eSopenharmony_ci * @since 12 404361847f8eSopenharmony_ci */ 404461847f8eSopenharmony_ci isGeneratorFunction(value: Object): boolean; 404561847f8eSopenharmony_ci /** 404661847f8eSopenharmony_ci * Check whether the entered value is a generator object type. 404761847f8eSopenharmony_ci * 404861847f8eSopenharmony_ci * @param { Object } value - A generator object value 404961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a generator object as returned from a built-in generator function. 405061847f8eSopenharmony_ci * This only reports back what the JavaScript engine is seeing; in particular, 405161847f8eSopenharmony_ci *the return value may not match the original source code if a transpilation tool was used. 405261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 405361847f8eSopenharmony_ci * @since 8 405461847f8eSopenharmony_ci */ 405561847f8eSopenharmony_ci /** 405661847f8eSopenharmony_ci * Check whether the entered value is a generator object type. 405761847f8eSopenharmony_ci * 405861847f8eSopenharmony_ci * @param { Object } value - A generator object value 405961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a generator object as returned from a built-in generator function. 406061847f8eSopenharmony_ci * This only reports back what the JavaScript engine is seeing; in particular, 406161847f8eSopenharmony_ci *the return value may not match the original source code if a transpilation tool was used. 406261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 406361847f8eSopenharmony_ci * @crossplatform 406461847f8eSopenharmony_ci * @since 10 406561847f8eSopenharmony_ci */ 406661847f8eSopenharmony_ci /** 406761847f8eSopenharmony_ci * Check whether the entered value is a generator object type. 406861847f8eSopenharmony_ci * 406961847f8eSopenharmony_ci * @param { Object } value - A generator object value 407061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a generator object as returned from a built-in generator function. 407161847f8eSopenharmony_ci * This only reports back what the JavaScript engine is seeing; in particular, 407261847f8eSopenharmony_ci *the return value may not match the original source code if a transpilation tool was used. 407361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 407461847f8eSopenharmony_ci * @crossplatform 407561847f8eSopenharmony_ci * @atomicservice 407661847f8eSopenharmony_ci * @since 12 407761847f8eSopenharmony_ci */ 407861847f8eSopenharmony_ci isGeneratorObject(value: Object): boolean; 407961847f8eSopenharmony_ci /** 408061847f8eSopenharmony_ci * Check whether the entered value is of int8array array type. 408161847f8eSopenharmony_ci * 408261847f8eSopenharmony_ci * @param { Object } value - A Int8Array value 408361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int8Array instance. 408461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 408561847f8eSopenharmony_ci * @since 8 408661847f8eSopenharmony_ci */ 408761847f8eSopenharmony_ci /** 408861847f8eSopenharmony_ci * Check whether the entered value is of int8array array type. 408961847f8eSopenharmony_ci * 409061847f8eSopenharmony_ci * @param { Object } value - A Int8Array value 409161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int8Array instance. 409261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 409361847f8eSopenharmony_ci * @crossplatform 409461847f8eSopenharmony_ci * @since 10 409561847f8eSopenharmony_ci */ 409661847f8eSopenharmony_ci /** 409761847f8eSopenharmony_ci * Check whether the entered value is of int8array array type. 409861847f8eSopenharmony_ci * 409961847f8eSopenharmony_ci * @param { Object } value - A Int8Array value 410061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int8Array instance. 410161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 410261847f8eSopenharmony_ci * @crossplatform 410361847f8eSopenharmony_ci * @atomicservice 410461847f8eSopenharmony_ci * @since 12 410561847f8eSopenharmony_ci */ 410661847f8eSopenharmony_ci isInt8Array(value: Object): boolean; 410761847f8eSopenharmony_ci /** 410861847f8eSopenharmony_ci * Check whether the entered value is the int16array type. 410961847f8eSopenharmony_ci * 411061847f8eSopenharmony_ci * @param { Object } value - A Int16Array value 411161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int16Array instance. 411261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 411361847f8eSopenharmony_ci * @since 8 411461847f8eSopenharmony_ci */ 411561847f8eSopenharmony_ci /** 411661847f8eSopenharmony_ci * Check whether the entered value is the int16array type. 411761847f8eSopenharmony_ci * 411861847f8eSopenharmony_ci * @param { Object } value - A Int16Array value 411961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int16Array instance. 412061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 412161847f8eSopenharmony_ci * @crossplatform 412261847f8eSopenharmony_ci * @since 10 412361847f8eSopenharmony_ci */ 412461847f8eSopenharmony_ci /** 412561847f8eSopenharmony_ci * Check whether the entered value is the int16array type. 412661847f8eSopenharmony_ci * 412761847f8eSopenharmony_ci * @param { Object } value - A Int16Array value 412861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int16Array instance. 412961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 413061847f8eSopenharmony_ci * @crossplatform 413161847f8eSopenharmony_ci * @atomicservice 413261847f8eSopenharmony_ci * @since 12 413361847f8eSopenharmony_ci */ 413461847f8eSopenharmony_ci isInt16Array(value: Object): boolean; 413561847f8eSopenharmony_ci /** 413661847f8eSopenharmony_ci * Check whether the entered value is the int32array array type. 413761847f8eSopenharmony_ci * 413861847f8eSopenharmony_ci * @param { Object } value - A Int32Array value 413961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int32Array instance. 414061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 414161847f8eSopenharmony_ci * @since 8 414261847f8eSopenharmony_ci */ 414361847f8eSopenharmony_ci /** 414461847f8eSopenharmony_ci * Check whether the entered value is the int32array array type. 414561847f8eSopenharmony_ci * 414661847f8eSopenharmony_ci * @param { Object } value - A Int32Array value 414761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int32Array instance. 414861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 414961847f8eSopenharmony_ci * @crossplatform 415061847f8eSopenharmony_ci * @since 10 415161847f8eSopenharmony_ci */ 415261847f8eSopenharmony_ci /** 415361847f8eSopenharmony_ci * Check whether the entered value is the int32array array type. 415461847f8eSopenharmony_ci * 415561847f8eSopenharmony_ci * @param { Object } value - A Int32Array value 415661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Int32Array instance. 415761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 415861847f8eSopenharmony_ci * @crossplatform 415961847f8eSopenharmony_ci * @atomicservice 416061847f8eSopenharmony_ci * @since 12 416161847f8eSopenharmony_ci */ 416261847f8eSopenharmony_ci isInt32Array(value: Object): boolean; 416361847f8eSopenharmony_ci /** 416461847f8eSopenharmony_ci * Check whether the entered value is of map type. 416561847f8eSopenharmony_ci * 416661847f8eSopenharmony_ci * @param { Object } value - A Map value 416761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Map instance. 416861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 416961847f8eSopenharmony_ci * @since 8 417061847f8eSopenharmony_ci */ 417161847f8eSopenharmony_ci /** 417261847f8eSopenharmony_ci * Check whether the entered value is of map type. 417361847f8eSopenharmony_ci * 417461847f8eSopenharmony_ci * @param { Object } value - A Map value 417561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Map instance. 417661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 417761847f8eSopenharmony_ci * @crossplatform 417861847f8eSopenharmony_ci * @since 10 417961847f8eSopenharmony_ci */ 418061847f8eSopenharmony_ci /** 418161847f8eSopenharmony_ci * Check whether the entered value is of map type. 418261847f8eSopenharmony_ci * 418361847f8eSopenharmony_ci * @param { Object } value - A Map value 418461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Map instance. 418561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 418661847f8eSopenharmony_ci * @crossplatform 418761847f8eSopenharmony_ci * @atomicservice 418861847f8eSopenharmony_ci * @since 12 418961847f8eSopenharmony_ci */ 419061847f8eSopenharmony_ci isMap(value: Object): boolean; 419161847f8eSopenharmony_ci /** 419261847f8eSopenharmony_ci * Check whether the entered value is the iterator type of map. 419361847f8eSopenharmony_ci * 419461847f8eSopenharmony_ci * @param { Object } value - A Map iterator value 419561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an iterator returned for a built-in Map instance. 419661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 419761847f8eSopenharmony_ci * @since 8 419861847f8eSopenharmony_ci */ 419961847f8eSopenharmony_ci /** 420061847f8eSopenharmony_ci * Check whether the entered value is the iterator type of map. 420161847f8eSopenharmony_ci * 420261847f8eSopenharmony_ci * @param { Object } value - A Map iterator value 420361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an iterator returned for a built-in Map instance. 420461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 420561847f8eSopenharmony_ci * @crossplatform 420661847f8eSopenharmony_ci * @since 10 420761847f8eSopenharmony_ci */ 420861847f8eSopenharmony_ci /** 420961847f8eSopenharmony_ci * Check whether the entered value is the iterator type of map. 421061847f8eSopenharmony_ci * 421161847f8eSopenharmony_ci * @param { Object } value - A Map iterator value 421261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an iterator returned for a built-in Map instance. 421361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 421461847f8eSopenharmony_ci * @crossplatform 421561847f8eSopenharmony_ci * @atomicservice 421661847f8eSopenharmony_ci * @since 12 421761847f8eSopenharmony_ci */ 421861847f8eSopenharmony_ci isMapIterator(value: Object): boolean; 421961847f8eSopenharmony_ci /** 422061847f8eSopenharmony_ci * Check whether the entered value is the module namespace object object type. 422161847f8eSopenharmony_ci * 422261847f8eSopenharmony_ci * @param { Object } value - A Module Namespace Object value 422361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of a Module Namespace Object. 422461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 422561847f8eSopenharmony_ci * @since 8 422661847f8eSopenharmony_ci */ 422761847f8eSopenharmony_ci /** 422861847f8eSopenharmony_ci * Check whether the entered value is the module namespace object object type. 422961847f8eSopenharmony_ci * 423061847f8eSopenharmony_ci * @param { Object } value - A Module Namespace Object value 423161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of a Module Namespace Object. 423261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 423361847f8eSopenharmony_ci * @crossplatform 423461847f8eSopenharmony_ci * @since 10 423561847f8eSopenharmony_ci */ 423661847f8eSopenharmony_ci /** 423761847f8eSopenharmony_ci * Check whether the entered value is the module namespace object object type. 423861847f8eSopenharmony_ci * 423961847f8eSopenharmony_ci * @param { Object } value - A Module Namespace Object value 424061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of a Module Namespace Object. 424161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 424261847f8eSopenharmony_ci * @crossplatform 424361847f8eSopenharmony_ci * @atomicservice 424461847f8eSopenharmony_ci * @since 12 424561847f8eSopenharmony_ci */ 424661847f8eSopenharmony_ci isModuleNamespaceObject(value: Object): boolean; 424761847f8eSopenharmony_ci /** 424861847f8eSopenharmony_ci * Check whether the value entered is of type error. 424961847f8eSopenharmony_ci * 425061847f8eSopenharmony_ci * @param { Object } value - A Error value 425161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of a built-in Error type. 425261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 425361847f8eSopenharmony_ci * @since 8 425461847f8eSopenharmony_ci */ 425561847f8eSopenharmony_ci /** 425661847f8eSopenharmony_ci * Check whether the value entered is of type error. 425761847f8eSopenharmony_ci * 425861847f8eSopenharmony_ci * @param { Object } value - A Error value 425961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of a built-in Error type. 426061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 426161847f8eSopenharmony_ci * @crossplatform 426261847f8eSopenharmony_ci * @since 10 426361847f8eSopenharmony_ci */ 426461847f8eSopenharmony_ci /** 426561847f8eSopenharmony_ci * Check whether the value entered is of type error. 426661847f8eSopenharmony_ci * 426761847f8eSopenharmony_ci * @param { Object } value - A Error value 426861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an instance of a built-in Error type. 426961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 427061847f8eSopenharmony_ci * @crossplatform 427161847f8eSopenharmony_ci * @atomicservice 427261847f8eSopenharmony_ci * @since 12 427361847f8eSopenharmony_ci */ 427461847f8eSopenharmony_ci isNativeError(value: Object): boolean; 427561847f8eSopenharmony_ci /** 427661847f8eSopenharmony_ci * Check whether the entered value is of the number object type. 427761847f8eSopenharmony_ci * 427861847f8eSopenharmony_ci * @param { Object } value - A number object value 427961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a number object, e.g. created by new Number(). 428061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 428161847f8eSopenharmony_ci * @since 8 428261847f8eSopenharmony_ci */ 428361847f8eSopenharmony_ci /** 428461847f8eSopenharmony_ci * Check whether the entered value is of the number object type. 428561847f8eSopenharmony_ci * 428661847f8eSopenharmony_ci * @param { Object } value - A number object value 428761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a number object, e.g. created by new Number(). 428861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 428961847f8eSopenharmony_ci * @crossplatform 429061847f8eSopenharmony_ci * @since 10 429161847f8eSopenharmony_ci */ 429261847f8eSopenharmony_ci /** 429361847f8eSopenharmony_ci * Check whether the entered value is of the number object type. 429461847f8eSopenharmony_ci * 429561847f8eSopenharmony_ci * @param { Object } value - A number object value 429661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a number object, e.g. created by new Number(). 429761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 429861847f8eSopenharmony_ci * @crossplatform 429961847f8eSopenharmony_ci * @atomicservice 430061847f8eSopenharmony_ci * @since 12 430161847f8eSopenharmony_ci */ 430261847f8eSopenharmony_ci isNumberObject(value: Object): boolean; 430361847f8eSopenharmony_ci /** 430461847f8eSopenharmony_ci * Check whether the entered value is of promise type. 430561847f8eSopenharmony_ci * 430661847f8eSopenharmony_ci * @param { Object } value - A Promise value 430761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Promise. 430861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 430961847f8eSopenharmony_ci * @since 8 431061847f8eSopenharmony_ci */ 431161847f8eSopenharmony_ci /** 431261847f8eSopenharmony_ci * Check whether the entered value is of promise type. 431361847f8eSopenharmony_ci * 431461847f8eSopenharmony_ci * @param { Object } value - A Promise value 431561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Promise. 431661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 431761847f8eSopenharmony_ci * @crossplatform 431861847f8eSopenharmony_ci * @since 10 431961847f8eSopenharmony_ci */ 432061847f8eSopenharmony_ci /** 432161847f8eSopenharmony_ci * Check whether the entered value is of promise type. 432261847f8eSopenharmony_ci * 432361847f8eSopenharmony_ci * @param { Object } value - A Promise value 432461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Promise. 432561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 432661847f8eSopenharmony_ci * @crossplatform 432761847f8eSopenharmony_ci * @atomicservice 432861847f8eSopenharmony_ci * @since 12 432961847f8eSopenharmony_ci */ 433061847f8eSopenharmony_ci isPromise(value: Object): boolean; 433161847f8eSopenharmony_ci /** 433261847f8eSopenharmony_ci * Check whether the value entered is of proxy type. 433361847f8eSopenharmony_ci * 433461847f8eSopenharmony_ci * @param { Object } value - A Proxy value 433561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a Proxy instance. 433661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 433761847f8eSopenharmony_ci * @since 8 433861847f8eSopenharmony_ci */ 433961847f8eSopenharmony_ci /** 434061847f8eSopenharmony_ci * Check whether the value entered is of proxy type. 434161847f8eSopenharmony_ci * 434261847f8eSopenharmony_ci * @param { Object } value - A Proxy value 434361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a Proxy instance. 434461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 434561847f8eSopenharmony_ci * @crossplatform 434661847f8eSopenharmony_ci * @since 10 434761847f8eSopenharmony_ci */ 434861847f8eSopenharmony_ci /** 434961847f8eSopenharmony_ci * Check whether the value entered is of proxy type. 435061847f8eSopenharmony_ci * 435161847f8eSopenharmony_ci * @param { Object } value - A Proxy value 435261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a Proxy instance. 435361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 435461847f8eSopenharmony_ci * @crossplatform 435561847f8eSopenharmony_ci * @atomicservice 435661847f8eSopenharmony_ci * @since 12 435761847f8eSopenharmony_ci */ 435861847f8eSopenharmony_ci isProxy(value: Object): boolean; 435961847f8eSopenharmony_ci /** 436061847f8eSopenharmony_ci * Check whether the entered value is of type regexp. 436161847f8eSopenharmony_ci * 436261847f8eSopenharmony_ci * @param { Object } value - A regular expression object value 436361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a regular expression object. 436461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 436561847f8eSopenharmony_ci * @since 8 436661847f8eSopenharmony_ci */ 436761847f8eSopenharmony_ci /** 436861847f8eSopenharmony_ci * Check whether the entered value is of type regexp. 436961847f8eSopenharmony_ci * 437061847f8eSopenharmony_ci * @param { Object } value - A regular expression object value 437161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a regular expression object. 437261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 437361847f8eSopenharmony_ci * @crossplatform 437461847f8eSopenharmony_ci * @since 10 437561847f8eSopenharmony_ci */ 437661847f8eSopenharmony_ci /** 437761847f8eSopenharmony_ci * Check whether the entered value is of type regexp. 437861847f8eSopenharmony_ci * 437961847f8eSopenharmony_ci * @param { Object } value - A regular expression object value 438061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a regular expression object. 438161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 438261847f8eSopenharmony_ci * @crossplatform 438361847f8eSopenharmony_ci * @atomicservice 438461847f8eSopenharmony_ci * @since 12 438561847f8eSopenharmony_ci */ 438661847f8eSopenharmony_ci isRegExp(value: Object): boolean; 438761847f8eSopenharmony_ci /** 438861847f8eSopenharmony_ci * Check whether the entered value is of type set. 438961847f8eSopenharmony_ci * 439061847f8eSopenharmony_ci * @param { Object } value - A Set instance value 439161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Set instance. 439261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 439361847f8eSopenharmony_ci * @since 8 439461847f8eSopenharmony_ci */ 439561847f8eSopenharmony_ci /** 439661847f8eSopenharmony_ci * Check whether the entered value is of type set. 439761847f8eSopenharmony_ci * 439861847f8eSopenharmony_ci * @param { Object } value - A Set instance value 439961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Set instance. 440061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 440161847f8eSopenharmony_ci * @crossplatform 440261847f8eSopenharmony_ci * @since 10 440361847f8eSopenharmony_ci */ 440461847f8eSopenharmony_ci /** 440561847f8eSopenharmony_ci * Check whether the entered value is of type set. 440661847f8eSopenharmony_ci * 440761847f8eSopenharmony_ci * @param { Object } value - A Set instance value 440861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Set instance. 440961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 441061847f8eSopenharmony_ci * @crossplatform 441161847f8eSopenharmony_ci * @atomicservice 441261847f8eSopenharmony_ci * @since 12 441361847f8eSopenharmony_ci */ 441461847f8eSopenharmony_ci isSet(value: Object): boolean; 441561847f8eSopenharmony_ci /** 441661847f8eSopenharmony_ci * Check whether the entered value is the iterator type of set. 441761847f8eSopenharmony_ci * 441861847f8eSopenharmony_ci * @param { Object } value - A Set iterator value 441961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an iterator returned for a built-in Set instance. 442061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 442161847f8eSopenharmony_ci * @since 8 442261847f8eSopenharmony_ci */ 442361847f8eSopenharmony_ci /** 442461847f8eSopenharmony_ci * Check whether the entered value is the iterator type of set. 442561847f8eSopenharmony_ci * 442661847f8eSopenharmony_ci * @param { Object } value - A Set iterator value 442761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an iterator returned for a built-in Set instance. 442861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 442961847f8eSopenharmony_ci * @crossplatform 443061847f8eSopenharmony_ci * @since 10 443161847f8eSopenharmony_ci */ 443261847f8eSopenharmony_ci /** 443361847f8eSopenharmony_ci * Check whether the entered value is the iterator type of set. 443461847f8eSopenharmony_ci * 443561847f8eSopenharmony_ci * @param { Object } value - A Set iterator value 443661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is an iterator returned for a built-in Set instance. 443761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 443861847f8eSopenharmony_ci * @crossplatform 443961847f8eSopenharmony_ci * @atomicservice 444061847f8eSopenharmony_ci * @since 12 444161847f8eSopenharmony_ci */ 444261847f8eSopenharmony_ci isSetIterator(value: Object): boolean; 444361847f8eSopenharmony_ci /** 444461847f8eSopenharmony_ci * Check whether the entered value is of type sharedarraybuffer. 444561847f8eSopenharmony_ci * 444661847f8eSopenharmony_ci * @param { Object } value - A SharedArrayBuffer instance value 444761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances. 444861847f8eSopenharmony_ci * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that. 444961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 445061847f8eSopenharmony_ci * @since 8 445161847f8eSopenharmony_ci */ 445261847f8eSopenharmony_ci /** 445361847f8eSopenharmony_ci * Check whether the entered value is of type sharedarraybuffer. 445461847f8eSopenharmony_ci * 445561847f8eSopenharmony_ci * @param { Object } value - A SharedArrayBuffer instance value 445661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances. 445761847f8eSopenharmony_ci * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that. 445861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 445961847f8eSopenharmony_ci * @crossplatform 446061847f8eSopenharmony_ci * @since 10 446161847f8eSopenharmony_ci */ 446261847f8eSopenharmony_ci /** 446361847f8eSopenharmony_ci * Check whether the entered value is of type sharedarraybuffer. 446461847f8eSopenharmony_ci * 446561847f8eSopenharmony_ci * @param { Object } value - A SharedArrayBuffer instance value 446661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in SharedArrayBuffer instance. This does not include ArrayBuffer instances. 446761847f8eSopenharmony_ci * Usually, it is desirable to test for both; See isAnyArrayBuffer() for that. 446861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 446961847f8eSopenharmony_ci * @crossplatform 447061847f8eSopenharmony_ci * @atomicservice 447161847f8eSopenharmony_ci * @since 12 447261847f8eSopenharmony_ci */ 447361847f8eSopenharmony_ci isSharedArrayBuffer(value: Object): boolean; 447461847f8eSopenharmony_ci /** 447561847f8eSopenharmony_ci * Check whether the entered value is a string object type. 447661847f8eSopenharmony_ci * 447761847f8eSopenharmony_ci * @param { Object } value - A String object value 447861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a string object, e.g. created by new String(). 447961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 448061847f8eSopenharmony_ci * @since 8 448161847f8eSopenharmony_ci */ 448261847f8eSopenharmony_ci /** 448361847f8eSopenharmony_ci * Check whether the entered value is a string object type. 448461847f8eSopenharmony_ci * 448561847f8eSopenharmony_ci * @param { Object } value - A String object value 448661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a string object, e.g. created by new String(). 448761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 448861847f8eSopenharmony_ci * @crossplatform 448961847f8eSopenharmony_ci * @since 10 449061847f8eSopenharmony_ci */ 449161847f8eSopenharmony_ci /** 449261847f8eSopenharmony_ci * Check whether the entered value is a string object type. 449361847f8eSopenharmony_ci * 449461847f8eSopenharmony_ci * @param { Object } value - A String object value 449561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a string object, e.g. created by new String(). 449661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 449761847f8eSopenharmony_ci * @crossplatform 449861847f8eSopenharmony_ci * @atomicservice 449961847f8eSopenharmony_ci * @since 12 450061847f8eSopenharmony_ci */ 450161847f8eSopenharmony_ci isStringObject(value: Object): boolean; 450261847f8eSopenharmony_ci /** 450361847f8eSopenharmony_ci * Check whether the entered value is a symbol object type. 450461847f8eSopenharmony_ci * 450561847f8eSopenharmony_ci * @param { Object } value - A symbol object value 450661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive. 450761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 450861847f8eSopenharmony_ci * @since 8 450961847f8eSopenharmony_ci */ 451061847f8eSopenharmony_ci /** 451161847f8eSopenharmony_ci * Check whether the entered value is a symbol object type. 451261847f8eSopenharmony_ci * 451361847f8eSopenharmony_ci * @param { Object } value - A symbol object value 451461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive. 451561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 451661847f8eSopenharmony_ci * @crossplatform 451761847f8eSopenharmony_ci * @since 10 451861847f8eSopenharmony_ci */ 451961847f8eSopenharmony_ci /** 452061847f8eSopenharmony_ci * Check whether the entered value is a symbol object type. 452161847f8eSopenharmony_ci * 452261847f8eSopenharmony_ci * @param { Object } value - A symbol object value 452361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a symbol object, created by calling Object() on a Symbol primitive. 452461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 452561847f8eSopenharmony_ci * @crossplatform 452661847f8eSopenharmony_ci * @atomicservice 452761847f8eSopenharmony_ci * @since 12 452861847f8eSopenharmony_ci */ 452961847f8eSopenharmony_ci isSymbolObject(value: Object): boolean; 453061847f8eSopenharmony_ci /** 453161847f8eSopenharmony_ci * Check whether the entered value is a type contained in typedarray. 453261847f8eSopenharmony_ci * 453361847f8eSopenharmony_ci * @param { Object } value - A TypedArray instance value 453461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in TypedArray instance. 453561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 453661847f8eSopenharmony_ci * @since 8 453761847f8eSopenharmony_ci */ 453861847f8eSopenharmony_ci /** 453961847f8eSopenharmony_ci * Check whether the entered value is a type contained in typedarray. 454061847f8eSopenharmony_ci * 454161847f8eSopenharmony_ci * @param { Object } value - A TypedArray instance value 454261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in TypedArray instance. 454361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 454461847f8eSopenharmony_ci * @crossplatform 454561847f8eSopenharmony_ci * @since 10 454661847f8eSopenharmony_ci */ 454761847f8eSopenharmony_ci /** 454861847f8eSopenharmony_ci * Check whether the entered value is a type contained in typedarray. 454961847f8eSopenharmony_ci * 455061847f8eSopenharmony_ci * @param { Object } value - A TypedArray instance value 455161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in TypedArray instance. 455261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 455361847f8eSopenharmony_ci * @crossplatform 455461847f8eSopenharmony_ci * @atomicservice 455561847f8eSopenharmony_ci * @since 12 455661847f8eSopenharmony_ci */ 455761847f8eSopenharmony_ci isTypedArray(value: Object): boolean; 455861847f8eSopenharmony_ci /** 455961847f8eSopenharmony_ci * Check whether the entered value is the uint8array array type. 456061847f8eSopenharmony_ci * 456161847f8eSopenharmony_ci * @param { Object } value - A Uint8Array value 456261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint8Array instance. 456361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 456461847f8eSopenharmony_ci * @since 8 456561847f8eSopenharmony_ci */ 456661847f8eSopenharmony_ci /** 456761847f8eSopenharmony_ci * Check whether the entered value is the uint8array array type. 456861847f8eSopenharmony_ci * 456961847f8eSopenharmony_ci * @param { Object } value - A Uint8Array value 457061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint8Array instance. 457161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 457261847f8eSopenharmony_ci * @crossplatform 457361847f8eSopenharmony_ci * @since 10 457461847f8eSopenharmony_ci */ 457561847f8eSopenharmony_ci /** 457661847f8eSopenharmony_ci * Check whether the entered value is the uint8array array type. 457761847f8eSopenharmony_ci * 457861847f8eSopenharmony_ci * @param { Object } value - A Uint8Array value 457961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint8Array instance. 458061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 458161847f8eSopenharmony_ci * @crossplatform 458261847f8eSopenharmony_ci * @atomicservice 458361847f8eSopenharmony_ci * @since 12 458461847f8eSopenharmony_ci */ 458561847f8eSopenharmony_ci isUint8Array(value: Object): boolean; 458661847f8eSopenharmony_ci /** 458761847f8eSopenharmony_ci * Check whether the entered value is the uint8clapedarray array type. 458861847f8eSopenharmony_ci * 458961847f8eSopenharmony_ci * @param { Object } value - A Uint8ClampedArray value 459061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint8ClampedArray instance. 459161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 459261847f8eSopenharmony_ci * @since 8 459361847f8eSopenharmony_ci */ 459461847f8eSopenharmony_ci /** 459561847f8eSopenharmony_ci * Check whether the entered value is the uint8clapedarray array type. 459661847f8eSopenharmony_ci * 459761847f8eSopenharmony_ci * @param { Object } value - A Uint8ClampedArray value 459861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint8ClampedArray instance. 459961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 460061847f8eSopenharmony_ci * @crossplatform 460161847f8eSopenharmony_ci * @since 10 460261847f8eSopenharmony_ci */ 460361847f8eSopenharmony_ci /** 460461847f8eSopenharmony_ci * Check whether the entered value is the uint8clapedarray array type. 460561847f8eSopenharmony_ci * 460661847f8eSopenharmony_ci * @param { Object } value - A Uint8ClampedArray value 460761847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint8ClampedArray instance. 460861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 460961847f8eSopenharmony_ci * @crossplatform 461061847f8eSopenharmony_ci * @atomicservice 461161847f8eSopenharmony_ci * @since 12 461261847f8eSopenharmony_ci */ 461361847f8eSopenharmony_ci isUint8ClampedArray(value: Object): boolean; 461461847f8eSopenharmony_ci /** 461561847f8eSopenharmony_ci * Check whether the entered value is the uint16array array array type. 461661847f8eSopenharmony_ci * 461761847f8eSopenharmony_ci * @param { Object } value - A Uint16Array value 461861847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint16Array instance. 461961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 462061847f8eSopenharmony_ci * @since 8 462161847f8eSopenharmony_ci */ 462261847f8eSopenharmony_ci /** 462361847f8eSopenharmony_ci * Check whether the entered value is the uint16array array array type. 462461847f8eSopenharmony_ci * 462561847f8eSopenharmony_ci * @param { Object } value - A Uint16Array value 462661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint16Array instance. 462761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 462861847f8eSopenharmony_ci * @crossplatform 462961847f8eSopenharmony_ci * @since 10 463061847f8eSopenharmony_ci */ 463161847f8eSopenharmony_ci /** 463261847f8eSopenharmony_ci * Check whether the entered value is the uint16array array array type. 463361847f8eSopenharmony_ci * 463461847f8eSopenharmony_ci * @param { Object } value - A Uint16Array value 463561847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint16Array instance. 463661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 463761847f8eSopenharmony_ci * @crossplatform 463861847f8eSopenharmony_ci * @atomicservice 463961847f8eSopenharmony_ci * @since 12 464061847f8eSopenharmony_ci */ 464161847f8eSopenharmony_ci isUint16Array(value: Object): boolean; 464261847f8eSopenharmony_ci /** 464361847f8eSopenharmony_ci * Check whether the entered value is the uint32array array type. 464461847f8eSopenharmony_ci * 464561847f8eSopenharmony_ci * @param { Object } value - A Uint32Array value 464661847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint32Array instance. 464761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 464861847f8eSopenharmony_ci * @since 8 464961847f8eSopenharmony_ci */ 465061847f8eSopenharmony_ci /** 465161847f8eSopenharmony_ci * Check whether the entered value is the uint32array array type. 465261847f8eSopenharmony_ci * 465361847f8eSopenharmony_ci * @param { Object } value - A Uint32Array value 465461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint32Array instance. 465561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 465661847f8eSopenharmony_ci * @crossplatform 465761847f8eSopenharmony_ci * @since 10 465861847f8eSopenharmony_ci */ 465961847f8eSopenharmony_ci /** 466061847f8eSopenharmony_ci * Check whether the entered value is the uint32array array type. 466161847f8eSopenharmony_ci * 466261847f8eSopenharmony_ci * @param { Object } value - A Uint32Array value 466361847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in Uint32Array instance. 466461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 466561847f8eSopenharmony_ci * @crossplatform 466661847f8eSopenharmony_ci * @atomicservice 466761847f8eSopenharmony_ci * @since 12 466861847f8eSopenharmony_ci */ 466961847f8eSopenharmony_ci isUint32Array(value: Object): boolean; 467061847f8eSopenharmony_ci /** 467161847f8eSopenharmony_ci * Check whether the entered value is of type weakmap. 467261847f8eSopenharmony_ci * 467361847f8eSopenharmony_ci * @param { Object } value - A WeakMap value 467461847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in WeakMap instance. 467561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 467661847f8eSopenharmony_ci * @since 8 467761847f8eSopenharmony_ci */ 467861847f8eSopenharmony_ci /** 467961847f8eSopenharmony_ci * Check whether the entered value is of type weakmap. 468061847f8eSopenharmony_ci * 468161847f8eSopenharmony_ci * @param { Object } value - A WeakMap value 468261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in WeakMap instance. 468361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 468461847f8eSopenharmony_ci * @crossplatform 468561847f8eSopenharmony_ci * @since 10 468661847f8eSopenharmony_ci */ 468761847f8eSopenharmony_ci /** 468861847f8eSopenharmony_ci * Check whether the entered value is of type weakmap. 468961847f8eSopenharmony_ci * 469061847f8eSopenharmony_ci * @param { Object } value - A WeakMap value 469161847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in WeakMap instance. 469261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 469361847f8eSopenharmony_ci * @crossplatform 469461847f8eSopenharmony_ci * @atomicservice 469561847f8eSopenharmony_ci * @since 12 469661847f8eSopenharmony_ci */ 469761847f8eSopenharmony_ci isWeakMap(value: Object): boolean; 469861847f8eSopenharmony_ci /** 469961847f8eSopenharmony_ci * Check whether the entered value is of type weakset. 470061847f8eSopenharmony_ci * 470161847f8eSopenharmony_ci * @param { Object } value - A WeakSet value 470261847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in WeakSet instance. 470361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 470461847f8eSopenharmony_ci * @since 8 470561847f8eSopenharmony_ci */ 470661847f8eSopenharmony_ci /** 470761847f8eSopenharmony_ci * Check whether the entered value is of type weakset. 470861847f8eSopenharmony_ci * 470961847f8eSopenharmony_ci * @param { Object } value - A WeakSet value 471061847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in WeakSet instance. 471161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 471261847f8eSopenharmony_ci * @crossplatform 471361847f8eSopenharmony_ci * @since 10 471461847f8eSopenharmony_ci */ 471561847f8eSopenharmony_ci /** 471661847f8eSopenharmony_ci * Check whether the entered value is of type weakset. 471761847f8eSopenharmony_ci * 471861847f8eSopenharmony_ci * @param { Object } value - A WeakSet value 471961847f8eSopenharmony_ci * @returns { boolean } Returns true if the value is a built-in WeakSet instance. 472061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 472161847f8eSopenharmony_ci * @crossplatform 472261847f8eSopenharmony_ci * @atomicservice 472361847f8eSopenharmony_ci * @since 12 472461847f8eSopenharmony_ci */ 472561847f8eSopenharmony_ci isWeakSet(value: Object): boolean; 472661847f8eSopenharmony_ci } 472761847f8eSopenharmony_ci /** 472861847f8eSopenharmony_ci * Insert before/after logic into a class method or replace implementation for a class method. 472961847f8eSopenharmony_ci * 473061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 473161847f8eSopenharmony_ci * @crossplatform 473261847f8eSopenharmony_ci * @since 11 473361847f8eSopenharmony_ci */ 473461847f8eSopenharmony_ci /** 473561847f8eSopenharmony_ci * Insert before/after logic into a class method or replace implementation for a class method. 473661847f8eSopenharmony_ci * 473761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 473861847f8eSopenharmony_ci * @crossplatform 473961847f8eSopenharmony_ci * @atomicservice 474061847f8eSopenharmony_ci * @since 12 474161847f8eSopenharmony_ci */ 474261847f8eSopenharmony_ci class Aspect { 474361847f8eSopenharmony_ci /** 474461847f8eSopenharmony_ci * Insert some logic before the method. In implementation the method will be replaced with a new function, 474561847f8eSopenharmony_ci * which will execute 'before' with the args 'this' and the args of the original method, and then execute 474661847f8eSopenharmony_ci * the original method. The return value of the new function is returned by the original method. 474761847f8eSopenharmony_ci * 474861847f8eSopenharmony_ci * @param { Object } targetClass - The operated class. 474961847f8eSopenharmony_ci * @param { string } methodName - The name of the operated method. 475061847f8eSopenharmony_ci * @param { boolean } isStatic - The flag whether the method is static. 475161847f8eSopenharmony_ci * @param { Function } before - The logic inserted before the method. 475261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 475361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 475461847f8eSopenharmony_ci * 2.Incorrect parameter types. 475561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 475661847f8eSopenharmony_ci * @crossplatform 475761847f8eSopenharmony_ci * @since 11 475861847f8eSopenharmony_ci */ 475961847f8eSopenharmony_ci /** 476061847f8eSopenharmony_ci * Insert some logic before the method. In implementation the method will be replaced with a new function, 476161847f8eSopenharmony_ci * which will execute 'before' with the args 'this' and the args of the original method, and then execute 476261847f8eSopenharmony_ci * the original method. The return value of the new function is returned by the original method. 476361847f8eSopenharmony_ci * 476461847f8eSopenharmony_ci * @param { Object } targetClass - The operated class. 476561847f8eSopenharmony_ci * @param { string } methodName - The name of the operated method. 476661847f8eSopenharmony_ci * @param { boolean } isStatic - The flag whether the method is static. 476761847f8eSopenharmony_ci * @param { Function } before - The logic inserted before the method. 476861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 476961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 477061847f8eSopenharmony_ci * 2.Incorrect parameter types. 477161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 477261847f8eSopenharmony_ci * @crossplatform 477361847f8eSopenharmony_ci * @atomicservice 477461847f8eSopenharmony_ci * @since 12 477561847f8eSopenharmony_ci */ 477661847f8eSopenharmony_ci static addBefore(targetClass: Object, methodName: string, isStatic: boolean, before: Function): void; 477761847f8eSopenharmony_ci /** 477861847f8eSopenharmony_ci * Insert some logic after the method. In implementation the method will be replaced with a new function, 477961847f8eSopenharmony_ci * which will execute the original method, and then execute 'after' with the args 'this' and the return value of 478061847f8eSopenharmony_ci * the original method, and the args of the original method. The return value of the new function is returned by 'after'. 478161847f8eSopenharmony_ci * 478261847f8eSopenharmony_ci * @param { Object } targetClass - The operated class. 478361847f8eSopenharmony_ci * @param { string } methodName - The name of the operated method. 478461847f8eSopenharmony_ci * @param { boolean } isStatic - The flag whether the method is static. 478561847f8eSopenharmony_ci * @param { Function } after - The logic inserted after the method. 478661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 478761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 478861847f8eSopenharmony_ci * 2.Incorrect parameter types. 478961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 479061847f8eSopenharmony_ci * @crossplatform 479161847f8eSopenharmony_ci * @since 11 479261847f8eSopenharmony_ci */ 479361847f8eSopenharmony_ci /** 479461847f8eSopenharmony_ci * Insert some logic after the method. In implementation the method will be replaced with a new function, 479561847f8eSopenharmony_ci * which will execute the original method, and then execute 'after' with the args 'this' and the return value of 479661847f8eSopenharmony_ci * the original method, and the args of the original method. The return value of the new function is returned by 'after'. 479761847f8eSopenharmony_ci * 479861847f8eSopenharmony_ci * @param { Object } targetClass - The operated class. 479961847f8eSopenharmony_ci * @param { string } methodName - The name of the operated method. 480061847f8eSopenharmony_ci * @param { boolean } isStatic - The flag whether the method is static. 480161847f8eSopenharmony_ci * @param { Function } after - The logic inserted after the method. 480261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 480361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 480461847f8eSopenharmony_ci * 2.Incorrect parameter types. 480561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 480661847f8eSopenharmony_ci * @crossplatform 480761847f8eSopenharmony_ci * @atomicservice 480861847f8eSopenharmony_ci * @since 12 480961847f8eSopenharmony_ci */ 481061847f8eSopenharmony_ci static addAfter(targetClass: Object, methodName: string, isStatic: boolean, after: Function): void; 481161847f8eSopenharmony_ci /** 481261847f8eSopenharmony_ci * Replace the original method with a new function, which will execute 'instead' with the args 'this' and the args 481361847f8eSopenharmony_ci * of the original method. The return value of the new function is returned by 'instead'. 481461847f8eSopenharmony_ci * 481561847f8eSopenharmony_ci * @param { Object } targetClass - The operated class. 481661847f8eSopenharmony_ci * @param { string } methodName - The name of the operated method. 481761847f8eSopenharmony_ci * @param { boolean } isStatic - The flag whether the method is static. 481861847f8eSopenharmony_ci * @param { Function } instead - The logic replaced with the method. 481961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 482061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 482161847f8eSopenharmony_ci * 2.Incorrect parameter types. 482261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 482361847f8eSopenharmony_ci * @crossplatform 482461847f8eSopenharmony_ci * @since 11 482561847f8eSopenharmony_ci */ 482661847f8eSopenharmony_ci /** 482761847f8eSopenharmony_ci * Replace the original method with a new function, which will execute 'instead' with the args 'this' and the args 482861847f8eSopenharmony_ci * of the original method. The return value of the new function is returned by 'instead'. 482961847f8eSopenharmony_ci * 483061847f8eSopenharmony_ci * @param { Object } targetClass - The operated class. 483161847f8eSopenharmony_ci * @param { string } methodName - The name of the operated method. 483261847f8eSopenharmony_ci * @param { boolean } isStatic - The flag whether the method is static. 483361847f8eSopenharmony_ci * @param { Function } instead - The logic replaced with the method. 483461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 483561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 483661847f8eSopenharmony_ci * 2.Incorrect parameter types. 483761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 483861847f8eSopenharmony_ci * @crossplatform 483961847f8eSopenharmony_ci * @atomicservice 484061847f8eSopenharmony_ci * @since 12 484161847f8eSopenharmony_ci */ 484261847f8eSopenharmony_ci static replace(targetClass: Object, methodName: string, isStatic: boolean, instead: Function) : void; 484361847f8eSopenharmony_ci } 484461847f8eSopenharmony_ci /** 484561847f8eSopenharmony_ci * Provide the ability to decode binary streams into strings. The supported encoding types include: utf-8, iso-8859-2, 484661847f8eSopenharmony_ci * koi8-r, macintosh, windows-1250, windows-1251, gbk, gb18030, big5, utf-16be, utf-16 le, etc. 484761847f8eSopenharmony_ci * 484861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 484961847f8eSopenharmony_ci * @crossplatform 485061847f8eSopenharmony_ci * @atomicservice 485161847f8eSopenharmony_ci * @since 12 485261847f8eSopenharmony_ci */ 485361847f8eSopenharmony_ci class StringDecoder { 485461847f8eSopenharmony_ci /** 485561847f8eSopenharmony_ci * The StringDecoder constructor. 485661847f8eSopenharmony_ci * 485761847f8eSopenharmony_ci * @param { string } [encoding] - Encoding type of the input data.Default: utf8. 485861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 485961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 486061847f8eSopenharmony_ci * 2.Incorrect parameter types; 486161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 486261847f8eSopenharmony_ci * @crossplatform 486361847f8eSopenharmony_ci * @atomicservice 486461847f8eSopenharmony_ci * @since 12 486561847f8eSopenharmony_ci */ 486661847f8eSopenharmony_ci constructor(encoding?: string); 486761847f8eSopenharmony_ci /** 486861847f8eSopenharmony_ci * Returns a decoded string, ensuring that any incomplete multiple byte characters at the end of the Uint8Array are 486961847f8eSopenharmony_ci * omitted from the returned string and stored in an internal buffer. 487061847f8eSopenharmony_ci * 487161847f8eSopenharmony_ci * @param { string | Uint8Array } chunk - The bytes to decode. 487261847f8eSopenharmony_ci * @returns { string } Returns a decoded string. 487361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 487461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 487561847f8eSopenharmony_ci * 2.Incorrect parameter types; 487661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 487761847f8eSopenharmony_ci * @crossplatform 487861847f8eSopenharmony_ci * @atomicservice 487961847f8eSopenharmony_ci * @since 12 488061847f8eSopenharmony_ci */ 488161847f8eSopenharmony_ci write(chunk: string | Uint8Array): string; 488261847f8eSopenharmony_ci /** 488361847f8eSopenharmony_ci * Returns any remaining input stored in the internal buffer as a string. After end() is called, 488461847f8eSopenharmony_ci * this object can be reused for new input. 488561847f8eSopenharmony_ci * 488661847f8eSopenharmony_ci * @param { string | Uint8Array } [chunk] - The bytes to decode. 488761847f8eSopenharmony_ci * @returns { string } Returns any remaining input stored in the internal buffer as a string. 488861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 488961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 489061847f8eSopenharmony_ci * 2.Incorrect parameter types; 489161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 489261847f8eSopenharmony_ci * @crossplatform 489361847f8eSopenharmony_ci * @atomicservice 489461847f8eSopenharmony_ci * @since 12 489561847f8eSopenharmony_ci */ 489661847f8eSopenharmony_ci end(chunk?: string | Uint8Array): string; 489761847f8eSopenharmony_ci } 489861847f8eSopenharmony_ci} 489961847f8eSopenharmony_ciexport default util; 4900