diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 27551e01d652a9c69d5b4346a1eff29fdab5a60a..67793d041d51c81ec354c9628332f86da8d38c9a 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -1360,13 +1360,22 @@ declare class WebAttribute extends CommonMethod { overviewModeAccess(overviewModeAccess: boolean): WebAttribute; /** - * Sets the atio of the text zoom. - * @param textZoomAtio The atio of the text zoom. + * Sets the ratio of the text zoom. + * @param textZoomAtio The ratio of the text zoom. * * @since 8 + * @deprecated since 9 */ textZoomAtio(textZoomAtio: number): WebAttribute; + /** + * Sets the ratio of the text zoom. + * @param textZoomRatio The ratio of the text zoom. + * + * @since 9 + */ + textZoomRatio(textZoomRatio: number): WebAttribute; + /** * Sets whether the Web access the database. * @param databaseAccess {@code true} means the Web access the database; {@code false} otherwise. @@ -1634,12 +1643,20 @@ declare class WebAttribute extends CommonMethod { /** * Notify search result to host application through onSearchResultReceive. - * @param callback function Triggered when the host application call searchAllAsync + * @param callback Function Triggered when the host application call searchAllAsync * or searchNext api on WebController and the request is valid. * * @since 9 */ onSearchResultReceive(callback: (event?: {activeMatchOrdinal: number, numberOfMatches: number, isDoneCounting: boolean}) => void): WebAttribute + + /** + * Triggered when the scroll bar slides to the specified position. + * @param callback Function Triggered when the scroll bar slides to the specified position. + * + * @since 9 + */ + onScroll(callback: (event: {xOffset: number, yOffset: number}) => void): WebAttribute; } declare const Web: WebInterface; diff --git a/api/@ohos.data.dataShare.d.ts b/api/@ohos.data.dataShare.d.ts index dd65d40222771c11c626f06352417556d9c2a34d..a773ff1954985421401321c39fe28f0b7069676a 100644 --- a/api/@ohos.data.dataShare.d.ts +++ b/api/@ohos.data.dataShare.d.ts @@ -28,6 +28,7 @@ declare namespace dataShare { * @param context Indicates the application context. * @param uri Indicates the path of the file to open. * @return Returns the dataShareHelper. + * @StageModelOnly */ function createDataShareHelper(context: Context, uri: string, callback: AsyncCallback): void; function createDataShareHelper(context: Context, uri: string): Promise; diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index 4bff24bad5718b7ef60edf95e8511d5d64c95701..195b01574936e953cf41cac9d045d65311e9d1a3 100644 --- a/api/@ohos.uitest.d.ts +++ b/api/@ohos.uitest.d.ts @@ -763,11 +763,10 @@ class UiComponent{ /** * Inject fling on the device display. * @syscap SystemCapability.Test.UiTest - * @param from the threshold of UI idle time, in millisecond. - * @param to the maximum time to wait for idle, in millisecond. + * @param from the coordinate point where the finger touches the screen. + * @param to the coordinate point where the finger leaves the screen. * @param stepLen the length of each step, in pixels. * @param speed the speed of fling (pixels per second),default is 600,the value ranges from 200 to 3000,set it 600 if out of range. - * @returns true if wait for idle succeed in the timeout, false otherwise. * @since 9 * @test */ @@ -944,6 +943,7 @@ class PointerMatrix { * @syscap SystemCapability.Test.UiTest * @param finger the index of target finger to set. * @param step the index of target step to set. + * @param point the coordinate of target step to set. * @since 9 * @test */ diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index 93aee728c88f0c1b831e565dacb5a778366da3ad..a7034ad5484f4219e452a7caede801973ff55972 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -84,6 +84,33 @@ declare namespace util { * @return return a version that returns promises */ function promiseWrapper(original: (err: Object, value: Object) => void): Object; + + /** + * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param entropyCache whether to generate the UUID with using the cache. Default: true. + * @return return a string representing this UUID. + */ + function randomUUID(entropyCache?: boolean): string; + + /** + * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param entropyCache whether to generate the UUID with using the cache. Default: true. + * @return return a Uint8Array representing this UUID. + */ + function randomBinaryUUID(entropyCache?: boolean): Uint8Array; + + /** + * Parse a UUID from the string standard representation as described in the RFC 4122 version 4. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param uuid string that specifies a UUID + * @return return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails. + */ + function parseUUID(uuid: string): Uint8Array; class TextDecoder { /** diff --git a/api/basic.d.ts b/api/basic.d.ts index 66a84e73b9f18b2ff56f4d724b4da6c8ac3ba694..2fe3d41b7ebd4b75e7059844a873ff46133fa8a6 100755 --- a/api/basic.d.ts +++ b/api/basic.d.ts @@ -41,22 +41,23 @@ export interface ErrorCallback { * Defines the basic async callback. * @since 6 */ -export interface AsyncCallback { +export interface AsyncCallback { /** * Defines the callback data. * @since 6 */ - (err: BusinessError, data: T): void; + (err: BusinessError, data: T): void; } /** * Defines the error interface. * @since 6 */ -export interface BusinessError extends Error { +export interface BusinessError extends Error { /** * Defines the basic error code. * @since 6 */ code: number; + data?: T; }