diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts
index e88783f82c4ab887efb0e3a43da1694c3e8d59b6..56f25ee6597851a4b30fd03e152a70bc925bda60 100644
--- a/api/@internal/component/ets/alert_dialog.d.ts
+++ b/api/@internal/component/ets/alert_dialog.d.ts
@@ -163,6 +163,10 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
};
}
+/**
+ * Defines the dialog param with buttons.
+ * @since 7
+ */
declare interface AlertDialogParamWithButtons extends AlertDialogParam {
/**
* First button.
diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts
index a902431b34a4e76c5560ef87c6984665e4d08e17..ce3c01431f97a50d8863b02318d906d4b3f510df 100644
--- a/api/@internal/component/ets/alphabet_indexer.d.ts
+++ b/api/@internal/component/ets/alphabet_indexer.d.ts
@@ -143,7 +143,7 @@ declare class AlphabetIndexerAttribute extends CommonMethod {}
-declare const Badge: BadgeInterface
+declare const Badge: BadgeInterface;
declare const BadgeInstance: BadgeAttribute;
diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts
index 4415acc8a0c39bede5a52cdd867183ef5e7d49dc..327a53ef07df5b396233d579af5981d57c9008cd 100644
--- a/api/@internal/component/ets/blank.d.ts
+++ b/api/@internal/component/ets/blank.d.ts
@@ -1,4 +1,4 @@
- /*
+/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts
index 68f472819de0d9dea9b66e90fbf43ca6ecc76193..e8e9b7e4adc350167035479141f85a4f181811df 100644
--- a/api/@internal/component/ets/button.d.ts
+++ b/api/@internal/component/ets/button.d.ts
@@ -127,5 +127,5 @@ declare class ButtonAttribute extends CommonMethod {
fontFamily(value: string | Resource): ButtonAttribute;
}
-declare const Button: ButtonInterface
+declare const Button: ButtonInterface;
declare const ButtonInstance: ButtonAttribute;
diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts
index 73af8ae5278a07e8f00f740823dda9548dc519f5..63569d81073600b4718ce87c33e435a764bbde85 100644
--- a/api/@internal/component/ets/calendar.d.ts
+++ b/api/@internal/component/ets/calendar.d.ts
@@ -102,7 +102,7 @@ interface CalendarDay {
}
/**
- * Date object.
+ * Date object.
* @since 7
* @systemapi
*/
diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts
index 37f1a30ba622a0e6caa02b7c87e23e65554b358e..45f68e8070149ba2fab45690d3b90d425155df87 100644
--- a/api/@internal/component/ets/canvas.d.ts
+++ b/api/@internal/component/ets/canvas.d.ts
@@ -1061,7 +1061,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer {
* @param settings Drawing attribute. For details, see {@link RenderingContextSettings}.
* @since 8
*/
- constructor(width: number, height: number,settings?: RenderingContextSettings);
+ constructor(width: number, height: number, settings?: RenderingContextSettings);
}
/**
@@ -1116,5 +1116,6 @@ declare class CanvasAttribute extends CommonMethod {
*/
onReady(event: () => void): CanvasAttribute;
}
+
declare const Canvas: CanvasInterface;
declare const CanvasInstance: CanvasAttribute;
diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts
index c66216a3398fc46911be175a9dc2eae4f8f4b4f0..e96cf31217f745d46fa8f2b060397ad4a411cc30 100644
--- a/api/@internal/component/ets/checkbox.d.ts
+++ b/api/@internal/component/ets/checkbox.d.ts
@@ -22,13 +22,13 @@ declare interface CheckboxOption {
* Current name of Checkbox.
* @since 8
*/
- name?: string;
+ name?: string;
/**
* Sets the group of Checkbox.
* @since 8
*/
- group?: string;
+ group?: string;
}
/**
@@ -53,13 +53,13 @@ declare class CheckboxAttribute extends CommonMethod {
* setting whether checkbox is selected.
* @since 8
*/
- select(value: boolean): CheckboxAttribute;
+ select(value: boolean): CheckboxAttribute;
/**
* setting the display color of checkbox.
* @since 8
*/
- selectedColor(value: ResourceColor): CheckboxAttribute;
+ selectedColor(value: ResourceColor): CheckboxAttribute;
/**
* Called when the selection status changes.
diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts
index 3fee2e97cd34e1d47790488a54af2448f3f52161..ebf1461c3827c2b53aa34363fa099544eb8153d9 100644
--- a/api/@internal/component/ets/checkboxgroup.d.ts
+++ b/api/@internal/component/ets/checkboxgroup.d.ts
@@ -44,7 +44,7 @@ declare interface CheckboxGroupOption {
* Setting the group of CheckboxGroup.
* @since 8
*/
- group?: string;
+ group?: string;
}
/**
@@ -56,12 +56,12 @@ declare interface CheckboxGroupResult {
* Checkbox name.
* @since 8
*/
- name: Array;
+ name: Array;
/**
* Set the group of status.
* @since 8
*/
- status: SelectStatus;
+ status: SelectStatus;
}
/**
@@ -85,13 +85,13 @@ declare class CheckboxGroupAttribute extends CommonMethod PropertyDecorator;
*/
declare const Watch: (value: string) => PropertyDecorator;
-
/**
* Defining Builder MethodDecorator
* @since 7
@@ -177,6 +176,7 @@ declare interface Rectangle {
/**
* Defining isSystemplugin Constants.
* @since 7
+ * @systemapi
*/
declare const isSystemplugin: (...args: string[]) => any;
@@ -198,6 +198,11 @@ declare function $rawfile(value: string): Resource;
*/
declare function getContentStorage(value: any): ContentStorage;
+/**
+ * Defines the context mock object.
+ * @since 8
+ * @systemapi
+ */
declare type Context = any;
/**
@@ -206,29 +211,291 @@ declare type Context = any;
*/
declare function getContext(value: any): Context;
-interface AnimateToParam {
+/**
+ * Defines the animate function params.
+ * @since 7
+ */
+declare interface AnimateParam {
+ /**
+ * Animation duration, in ms.
+ * @since 7
+ */
duration?: number;
+ /**
+ * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower
+ * animation playback. The value 0 means that there is no animation.
+ * @since 7
+ */
tempo?: number;
+ /**
+ * Animation curve.
+ * @since 7
+ */
curve?: Curve | string;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
delay?: number;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
iterations?: number;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
playMode?: PlayMode;
+ /**
+ * Callback invoked when the animation playback is complete.
+ * @since 7
+ */
onFinish?: () => void;
}
+/**
+ * Defines the motion path option.
+ * @since 7
+ */
+declare interface MotionPathOption {
+ /**
+ * The path info.
+ * @since 7
+ */
+ path: string;
+ /**
+ * The origin point info.
+ * @since 7
+ */
+ from?: number;
+ /**
+ * The distance point info.
+ * @since 7
+ */
+ to?: number;
+ /**
+ * The rotate info.
+ * @since 7
+ */
+ rotatable?: boolean;
+}
+
+/**
+ * Defines the shard transition function params.
+ * @since 7
+ */
+declare interface sharedTransitionOption {
+ /**
+ * Animation duration, in ms.
+ * @since 7
+ */
+ duration?: number;
+ /**
+ * Animation duration, in ms.
+ * @since 7
+ */
+ curve?: Curve | string;
+ /**
+ * Animation playback mode. By default, the animation is played from the beginning after the playback is complete.
+ * @since 7
+ */
+ delay?: number;
+ /**
+ * The motion path info.
+ * @since 7
+ */
+ motionPath?: MotionPathOption;
+ /**
+ * Z index info.
+ * @since 7
+ */
+ zIndex?: number;
+ /**
+ * the animate type.
+ * @since 7
+ */
+ type?: SharedTransitionEffectType;
+}
+
+/**
+ * Defines the option of translate.
+ * @since 7
+ */
+declare interface TranslateOption {
+ /**
+ * The param of x direction.
+ * @since 7
+ */
+ x?: number | string;
+ /**
+ * The param of y direction.
+ * @since 7
+ */
+ y?: number | string;
+ /**
+ * The param of z direction.
+ * @since 7
+ */
+ z?: number | string;
+}
+
+/**
+ * Defines the option of scale.
+ * @since 7
+ */
+declare interface ScaleOption {
+ /**
+ * The param of x direction.
+ * @since 7
+ */
+ x?: number;
+ /**
+ * The param of y direction.
+ * @since 7
+ */
+ y?: number;
+ /**
+ * The param of z direction.
+ * @since 7
+ */
+ z?: number;
+ /**
+ * The param of center point of x.
+ * @since 7
+ */
+ centerX?: number | string;
+ /**
+ * The param of center point of y.
+ * @since 7
+ */
+ centerY?: number | string;
+}
+
+declare interface RotateOption {
+ /**
+ * The param of x direction.
+ * @since 7
+ */
+ x?: number;
+ /**
+ * The param of y direction.
+ * @since 7
+ */
+ y?: number;
+ /**
+ * The param of z direction.
+ * @since 7
+ */
+ z?: number;
+ /**
+ * The param of center point of x.
+ * @since 7
+ */
+ centerX?: number | string;
+ /**
+ * The param of center point of y.
+ * @since 7
+ */
+ centerY?: number | string;
+ /**
+ * The param of angle.
+ * @since 7
+ */
+ angle: number | string;
+}
+
+/**
+ * Defines the param of transition.
+ * @since 7
+ */
+declare interface TransitionOption {
+ /**
+ * Defines the param of type.
+ * @since 7
+ */
+ type?: TransitionType;
+ /**
+ * Defines the param of opacity.
+ * @since 7
+ */
+ opacity?: number;
+ /**
+ * Defines the param of translate.
+ * @since 7
+ */
+ translate?: TransitionOption;
+ /**
+ * Defines the param of scale.
+ * @since 7
+ */
+ scale?: ScaleOption;
+ /**
+ * Defines the param of rotate.
+ * @since 7
+ */
+ rotate?: RotateOption;
+}
+
/**
* Define Preview property
* @since 8
+ * @systemapi
*/
interface PreviewParams {
+ /**
+ * Define Preview title
+ * @since 8
+ * @systemapi
+ */
title?: string;
+ /**
+ * Define Preview width
+ * @since 8
+ * @systemapi
+ */
width?: number;
+ /**
+ * Define Preview height
+ * @since 8
+ * @systemapi
+ */
height?: number;
+ /**
+ * Define Preview locale
+ * @since 8
+ * @systemapi
+ */
locale?: string;
+ /**
+ * Define Preview colorMode
+ * @since 8
+ * @systemapi
+ */
colorMode?: string;
+ /**
+ * Define Preview deviceType
+ * @since 8
+ * @systemapi
+ */
deviceType?: string;
+ /**
+ * Define Preview dpi
+ * @since 8
+ * @systemapi
+ */
dpi?: number;
+ /**
+ * Define Preview orientation
+ * @since 8
+ * @systemapi
+ */
orientation?: string;
+ /**
+ * Define Preview roundScreen
+ * @since 8
+ * @systemapi
+ */
roundScreen?: boolean;
}
@@ -236,7 +503,7 @@ interface PreviewParams {
* ItemDragInfo object description
* @since 8
*/
-interface ItemDragInfo {
+declare interface ItemDragInfo {
/**
* Obtains the X coordinate of the drag window, in vp.
* @since 8
@@ -254,7 +521,7 @@ interface ItemDragInfo {
* DragItemInfo object description
* @since 8
*/
-interface DragItemInfo {
+declare interface DragItemInfo {
/**
* Uses the pixelMap object for drawing.
* @since 8
@@ -274,17 +541,11 @@ interface DragItemInfo {
extraInfo?: string;
}
-/**
- * Defining syscap function.
- * @since 8
- */
-declare function canIUse(syscap: string): boolean;
-
/**
* Defining animation function.
* @since 7
*/
-declare function animateTo(value: AnimateToParam, event: () => void): void;
+declare function animateTo(value: AnimateParam, event: () => void): void;
/**
* Converts a value in vp units to a value in px.
@@ -326,7 +587,7 @@ declare function px2lpx(value: number): number;
* Defines the event target.
* @since 8
*/
-interface EventTarget {
+declare interface EventTarget {
/**
* Area of current target.
* @since 8
@@ -362,7 +623,7 @@ declare enum SourceType {
* Defines the base event.
* @since 8
*/
-interface BaseEvent {
+declare interface BaseEvent {
/**
* Defines the current target which fires this event.
* @since 8
@@ -386,7 +647,7 @@ interface BaseEvent {
* The tap action triggers this method invocation.
* @since 7
*/
-interface ClickEvent extends BaseEvent {
+declare interface ClickEvent extends BaseEvent {
/**
* X coordinate of the click point relative to the left edge of the device screen.
* @since 7
@@ -416,7 +677,7 @@ interface ClickEvent extends BaseEvent {
* The mouse click action triggers this method invocation.
* @since 8
*/
-interface MouseEvent extends BaseEvent {
+declare interface MouseEvent extends BaseEvent {
/**
* Mouse button of the click event.
* @since 8
@@ -464,7 +725,7 @@ interface MouseEvent extends BaseEvent {
* Type of the touch event.
* @since 7
*/
-interface TouchObject {
+declare interface TouchObject {
/**
* Type of the touch event.
* @since 7
@@ -506,7 +767,7 @@ interface TouchObject {
* Touch Action Function Parameters
* @since 7
*/
-interface TouchEvent extends BaseEvent {
+declare interface TouchEvent extends BaseEvent {
/**
* Type of the touch event.
* @since 7
@@ -532,13 +793,21 @@ interface TouchEvent extends BaseEvent {
stopPropagation?: () => void;
}
+/**
+ * Defines the PixelMap type object for ui component.
+ * @since 7
+ */
+declare type PixelMap = PixelMapMock;
+
/**
* pixelmap object with release function.
+ * @systemapi
* @since 7
*/
-declare class PixelMap {
+declare class PixelMapMock {
/**
* release function.
+ * @systemapi
* @since 7
*/
release(): void;
@@ -548,7 +817,7 @@ declare class PixelMap {
* DragEvent object description
* @since 7
*/
-interface DragEvent {
+declare interface DragEvent {
/**
* Obtains the X coordinate of the drag window, in vp.
* @since 7
@@ -566,7 +835,7 @@ interface DragEvent {
* KeyEvent object description:
* @since 7
*/
-interface KeyEvent {
+declare interface KeyEvent {
/**
* Type of a key.
* @since 7
@@ -621,7 +890,7 @@ interface KeyEvent {
* Component State Styels.
* @since 8
*/
-interface StateStyels {
+declare interface StateStyels {
/**
* Defines normal state styles.
* @since 8
@@ -653,7 +922,11 @@ interface StateStyels {
clicked?: any;
}
-interface PopupOption {
+/**
+ * Defines the popup options.
+ * @since 7
+ */
+declare interface PopupOption {
/**
* Information in the pop-up window.
* @since 7
@@ -709,7 +982,11 @@ interface PopupOption {
onStateChange?: (event: { isVisible: boolean }) => void;
}
-interface CustomPopupOption {
+/**
+ * Defines the custom popup option.
+ * @since 8
+ */
+declare interface CustomPopupOption {
/**
* builder of popup
* @since 8
@@ -754,13 +1031,15 @@ interface CustomPopupOption {
}
/**
- * CommonMethod
+ * CommonMethod.
* @since 7
*/
declare class CommonMethod {
/**
* constructor.
+ * @systemapi
* @since 7
+ * @ignore
*/
constructor();
@@ -778,7 +1057,6 @@ declare class CommonMethod {
/**
* Sets the response region of the current component.
- * @devices phone, tablet, car
* @since 8
*/
responseRegion(value: Array | Rectangle): T;
@@ -787,42 +1065,35 @@ declare class CommonMethod {
* The size of the current component.
* @since 7
*/
- size(value: { width?: Length; height?: Length }): T;
+ size(value: SizeOptions): T;
/**
* constraint Size:
* minWidth:minimum Width,maxWidth:maximum Width,minHeight:minimum Height ,maxHeight:maximum Height,
* @since 7
*/
- constraintSize(value: {
- minWidth?: number | string | Resource;
- maxWidth?: number | string | Resource;
- minHeight?: number | string | Resource;
- maxHeight?: number | string | Resource;
- }): T;
+ constraintSize(value: ConstraintSizeOptions): T;
/**
* Sets the touchable of the current component
- * @devices phone, tablet, car
* @since 8
*/
touchable(value: boolean): T;
/**
* layout Weight
- * @devices phone, tablet, car.
* @since 7
*/
layoutWeight(value: number | string): T;
/**
- * Inner margin
+ * Inner margin.
* @since 7
*/
padding(value: Padding | Length): T;
/**
- * Outer Margin
+ * Outer Margin.
* @since 7
*/
margin(value: Margin | Length): T;
@@ -831,32 +1102,27 @@ declare class CommonMethod {
* Background color
* @since 7
*/
- backgroundColor(value: Color | number | string | Resource): T;
+ backgroundColor(value: ResourceColor): T;
/**
* Background image
* src: Image address url
* @since 7
*/
- backgroundImage(src: string | Resource, repeat?: ImageRepeat): T;
+ backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T;
/**
* Background image size
* @since 7
*/
- backgroundImageSize(
- value: {
- width?: number | string | Resource;
- height?: number | string | Resource
- } | ImageSize
- ): T;
+ backgroundImageSize(value: SizeOptions | ImageSize): T;
/**
* Background image position
* x:Horizontal coordinate;y:Vertical axis coordinate.
* @since 7
*/
- backgroundImagePosition(value: { x?: number | string | Resource; y?: number | string | Resource } | Alignment): T;
+ backgroundImagePosition(value: Position | Alignment): T;
/**
* Opacity
@@ -869,12 +1135,7 @@ declare class CommonMethod {
* width:Border width;color:Border color;radius:Border radius;
* @since 7
*/
- border(value: {
- width?: number | string | Resource;
- color?: Color | number | string | Resource;
- radius?: number | string | Resource;
- style?: BorderStyle;
- }): T;
+ border(value: BorderOption): T;
/**
* Border style
@@ -886,19 +1147,19 @@ declare class CommonMethod {
* Border width
* @since 7
*/
- borderWidth(value: number | string | Resource): T;
+ borderWidth(value: Length): T;
/**
* Border color
* @since 7
*/
- borderColor(value: Color | number | string | Resource): T;
+ borderColor(value: ResourceColor): T;
/**
* Border radius
* @since 7
*/
- borderRadius(value: number | string | Resource): T;
+ borderRadius(value: Length): T;
/**
* Trigger a click event when a click is clicked.
@@ -940,68 +1201,38 @@ declare class CommonMethod {
* Set focusable.
* @since 8
*/
- focusable(value: boolean): T;
+ focusable(value: boolean): T;
/**
* Trigger a event when got focus.
* @since 8
*/
- onFocus(event: () => void): T;
+ onFocus(event: () => void): T;
/**
* Trigger a event when lose focus.
* @since 8
*/
- onBlur(event: () => void): T;
+ onBlur(event: () => void): T;
/**
* Trigger a event when focus move.
* @since 8
+ * @systemapi
*/
- onFocusMove(event: (direction?: FocusDirection) => void): T;
+ onFocusMove(event: (direction?: FocusDirection) => void): T;
/**
* animation
* @since 7
*/
- animation(value: {
- duration?: number;
- tempo?: number;
- curve?: Curve | string;
- delay?: number;
- iterations?: number;
- playMode?: PlayMode;
- onFinish?: () => void;
- }): T;
+ animation(value: AnimateParam): T;
/**
* Transition parameter
* @since 7
*/
- transition(value: {
- type?: TransitionType;
- opacity?: number;
- translate?: {
- x?: number | string;
- y?: number | string;
- z?: number | string;
- };
- scale?: {
- x?: number;
- y?: number;
- z?: number;
- centerX?: number | string;
- centerY?: number | string;
- };
- rotate?: {
- x?: number;
- y?: number;
- z?: number;
- centerX?: number | string;
- centerY?: number | string;
- angle: number | string;
- };
- }): T;
+ transition(value: TransitionOption): T;
/**
* Bind gesture recognition.
@@ -1105,13 +1336,13 @@ declare class CommonMethod {
* When this parameter is set together with slide, slide takes effect by default.
* @since 7
*/
- translate(value: { x?: number | string; y?: number | string; z?: number | string }): T;
+ translate(value: TranslateOption): T;
/**
* Sets the zoom effect during page transition. The value is the start point of entry and end point of exit.
* @since 7
*/
- scale(value: { x?: number; y?: number; z?: number; centerX?: number | string; centerY?: number | string }): T;
+ scale(value: ScaleOption): T;
/**
* Default number of occupied columns, indicating the number of occupied grid columns when the number of columns (span) of the corresponding size is not set in the useSizeType attribute.
@@ -1131,14 +1362,7 @@ declare class CommonMethod {
* The values are the start point during insertion and the end point during deletion.
* @since 7
*/
- rotate(value: {
- x?: number;
- y?: number;
- z?: number;
- centerX?: number | string;
- centerY?: number | string;
- angle: number | string;
- }): T;
+ rotate(value: RotateOption): T;
/**
* Sets the transformation matrix for the current component.
@@ -1211,22 +1435,7 @@ declare class CommonMethod {
* If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description.
* @since 7
*/
- sharedTransition(
- id: string,
- options?: {
- duration?: number;
- curve?: Curve | string;
- delay?: number;
- motionPath?: {
- path: string;
- from?: number;
- to?: number;
- rotatable?: boolean;
- };
- zIndex?: number;
- type?: SharedTransitionEffectType;
- },
- ): T;
+ sharedTransition(id: string, options?: sharedTransitionOption): T;
/**
* Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|).
@@ -1244,20 +1453,20 @@ declare class CommonMethod {
* position
* @since 7
*/
- position(value: { x?: number | string | Resource; y?: number | string | Resource }): T;
+ position(value: Position): T;
/**
* Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element.
* @since 7
*/
- markAnchor(value: { x?: number | string | Resource; y?: number | string | Resource }): T;
+ markAnchor(value: Position): T;
/**
* Coordinate offset relative to the layout completion position.
* Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing.
* @since 7
*/
- offset(value: { x?: number | string | Resource; y?: number | string | Resource }): T;
+ offset(value: Position): T;
/**
* If the value is true, the component is available and can respond to operations such as clicking.
@@ -1371,7 +1580,7 @@ declare class CommonMethod {
* rotatble:Whether to follow the path for rotation.
* @since 7
*/
- motionPath(value: { path: string; from?: number; to?: number; rotatable?: boolean }): T;
+ motionPath(value: MotionPathOption): T;
/**
* Add a shadow effect to the current component
@@ -1400,6 +1609,8 @@ declare class CommonMethod {
/**
* Key. User can set an key to the component to identify it.
* @since 8
+ * @systemapi
+ * @test
*/
key(value: string): T;
@@ -1431,7 +1642,7 @@ declare class CommonMethod {
* ContextMenu control
* @since 8
*/
- bindContextMenu(content: CustomBuilder, responseType : ResponseType): T;
+ bindContextMenu(content: CustomBuilder, responseType: ResponseType): T;
/**
* Sets styles for component state.
@@ -1447,13 +1658,13 @@ declare class CommonMethod {
}
/**
- * CommonAttribute
+ * CommonAttribute for ide.
* @since 7
*/
declare class CommonAttribute extends CommonMethod {}
/**
- * CommonInterface
+ * CommonInterface for ide.
* @since 7
*/
interface CommonInterface {
@@ -1461,13 +1672,13 @@ interface CommonInterface {
}
/**
- * CommonInstance
+ * CommonInstance for ide.
* @since 7
*/
declare const CommonInstance: CommonAttribute;
/**
- * Common
+ * Common for ide.
* @since 7
*/
declare const Common: CommonInterface;
@@ -1486,6 +1697,7 @@ declare class CommonShapeMethod extends CommonMethod {
/**
* constructor.
* @since 7
+ * @syetemapi
*/
constructor();
@@ -1493,13 +1705,13 @@ declare class CommonShapeMethod extends CommonMethod {
* border Color
* @since 7
*/
- stroke(value: Color | number | string | Resource): T;
+ stroke(value: ResourceColor): T;
/**
* Fill color.
* @since 7
*/
- fill(value: Color | number | string | Resource): T;
+ fill(value: ResourceColor): T;
/**
* Offset from the start point of the border drawing.
@@ -1541,7 +1753,7 @@ declare class CommonShapeMethod extends CommonMethod {
* Sets the width of the dividing line.
* @since 7
*/
- strokeWidth(value: number | string | Resource): T;
+ strokeWidth(value: Length): T;
/**
* Indicates whether to enable anti-aliasing
@@ -1583,11 +1795,15 @@ declare class CustomComponent {
/**
* View
* @ignore ide should ignore this class
+ * @systemapi
+ * @since 7
*/
declare class View {
/**
* Just use for generate tsbundle
* @ignore ide should ignore this arrtibute
+ * @systemapi
+ * @since 7
*/
create(value: any): any;
}
diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts
index d5c55b20326d52915413b59f6e530182066a9787..13052c049659af9bb1fd0b7560f7d5e66eabb91d 100644
--- a/api/@internal/component/ets/date_picker.d.ts
+++ b/api/@internal/component/ets/date_picker.d.ts
@@ -80,20 +80,24 @@ declare interface DatePickerResult {
declare interface DatePickerOption {
/**
* Specifies the start date of the date selector.
+ * @since 8
*/
start?: Date;
/**
* Specifies the end date for the date selector.
+ * @since 8
*/
end?: Date;
/**
* Specifies the date selector check date or time selector check time.
+ * @since 8
*/
selected?: Date;
/**
* Selector type, including date selector and time selector. By default, the date selector is used.
+ * @since 8
*/
type?: DatePickerType;
}
diff --git a/api/@internal/component/ets/divider.d.ts b/api/@internal/component/ets/divider.d.ts
index 4ee88aa42e24c44c25e9f4d0d61aa9e2edad3633..67ce98ac5debfff200f3423a798fb40e20f2e37f 100644
--- a/api/@internal/component/ets/divider.d.ts
+++ b/api/@internal/component/ets/divider.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides a divider component to separate different content blocks/content elements.
* @since 7
@@ -57,5 +56,5 @@ declare class DividerAttribute extends CommonMethod {
lineCap(value: LineCapStyle): DividerAttribute;
}
-declare const Divider: DividerInterface
+declare const Divider: DividerInterface;
declare const DividerInstance: DividerAttribute;
diff --git a/api/@internal/component/ets/ellipse.d.ts b/api/@internal/component/ets/ellipse.d.ts
index 2ba7cdbbba6274970b5ec0f5cdd74d899db71117..2b207f95085f3a4537fb8b0170f068ea2349999d 100644
--- a/api/@internal/component/ets/ellipse.d.ts
+++ b/api/@internal/component/ets/ellipse.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Ellipse drawing.
* @since 7
diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts
index bf60ad002433926b4f6e0c48cd52646d85a7f623..87d43584336f47be4a130346430559a1bdf053c2 100644
--- a/api/@internal/component/ets/enums.d.ts
+++ b/api/@internal/component/ets/enums.d.ts
@@ -457,60 +457,6 @@ declare enum PlayMode {
AlternateReverse,
}
-/**
- * This style allows you to set the window blurring degree and blurring style of the current component layout range,
- * @since 7
- */
-declare enum BlurStyle {
- /**
- * Small range glow effect.
- * @since 7
- */
- SmallLight,
-
- /**
- * Medium range glow effect.
- * @since 7
- */
- MediumLight,
-
- /**
- * Wide range of luminous effects.
- * @since 7
- */
- LargeLight,
-
- /**
- * Super-range luminous effect.
- * @since 7
- */
- XlargeLight,
-
- /**
- * Small range of dark effects.
- * @since 7
- */
- SmallDark,
-
- /**
- * Medium range dark effect.
- * @since 7
- */
- MediumDark,
-
- /**
- * Wide range of dark effects.
- * @since 7
- */
- LargeDark,
-
- /**
- * Extra large range of dark effects.
- * @since 7
- */
- XlargeDark,
-}
-
/**
* Type of a key.
* @since 7
diff --git a/api/@internal/component/ets/for_each.d.ts b/api/@internal/component/ets/for_each.d.ts
index d1e8c71767b13b0655f5eabebe878514378aa4b4..f6bf97cf24a4e5719cf5c22849edf0b8fdabfe8f 100644
--- a/api/@internal/component/ets/for_each.d.ts
+++ b/api/@internal/component/ets/for_each.d.ts
@@ -14,7 +14,7 @@
*/
/**
- * looping
+ * looping function.
* @since 7
*/
interface ForEachInterface {
@@ -29,8 +29,4 @@ interface ForEachInterface {
): ForEachInterface;
}
-/**
- * @devices phone, tablet, car
- * @since 7
- */
declare const ForEach: ForEachInterface;
diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts
index 1d3fa7dfdd56e0ff2605ab27801d6f5ecee3ff10..e94054f90fc62702d70c57a1d4e7993ddf680d4c 100644
--- a/api/@internal/component/ets/form_component.d.ts
+++ b/api/@internal/component/ets/form_component.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Defines the FormDimension enum.
* @since 7
@@ -132,6 +131,13 @@ declare class FormComponentAttribute extends CommonMethod void): FormComponentAttribute;
+
+ /**
+ * Uninstall Card.
+ * @since 7
+ * @systemapi
+ */
+ onUninstall(callback: (info: { id: number }) => void): FormComponentAttribute;
}
declare const FormComponent: FormComponentInterface;
diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts
index 6002fadf1e2c2b76349bb05cdfe4bb2a0adb9e89..5186c6c7748337777aa9d14805ad6d5afb73b19a 100644
--- a/api/@internal/component/ets/gauge.d.ts
+++ b/api/@internal/component/ets/gauge.d.ts
@@ -62,5 +62,5 @@ declare class GaugeAttribute extends CommonMethod {
strokeWidth(length: number): GaugeAttribute;
}
-declare const Gauge: GaugeInterface
+declare const Gauge: GaugeInterface;
declare const GaugeInstance: GaugeAttribute;
diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts
index a91f87a8593303880f2d89e5434ca595ff355c55..e5c58dc6825e62d56c2444cf3b29ed7fbbe3e8b9 100644
--- a/api/@internal/component/ets/gesture.d.ts
+++ b/api/@internal/component/ets/gesture.d.ts
@@ -13,30 +13,6 @@
* limitations under the License.
*/
-/**
- * Creating an Object
- * @since 7
- */
-declare enum GestureDirection {
- /**
- * Sliding in all directions.
- * @since 7
- */
- All,
-
- /**
- * Sliding horizontally.
- * @since 7
- */
- Horizontal,
-
- /**
- * Sliding Vertical
- * @since 7
- */
- Vertical,
-}
-
/**
* Creating an Object
* @since 7
diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts
index fb54634f35b985a9b9bedea76e1134248687a435..e58a4765bcee9799274ca04d52c879227b7de0d0 100644
--- a/api/@internal/component/ets/grid.d.ts
+++ b/api/@internal/component/ets/grid.d.ts
@@ -13,8 +13,8 @@
* limitations under the License.
*/
-
/**
+ * Defines the grid interface.
* @since 7
*/
interface GridInterface {
@@ -30,13 +30,30 @@ interface GridInterface {
* @since 8
*/
declare enum GridDirection {
+ /**
+ * The row direction.
+ * @since 8
+ */
Row,
+ /**
+ * The column direction.
+ * @since 8
+ */
Column,
+ /**
+ * The row reverse direction.
+ * @since 8
+ */
RowReverse,
- ColumnReverse
+ /**
+ * The column reverse direction.
+ * @since 8
+ */
+ ColumnReverse,
}
/**
+ * Defines the grid attibute functions.
* @since 7
*/
declare class GridAttribute extends CommonMethod {
@@ -112,10 +129,10 @@ declare class GridAttribute extends CommonMethod {
*/
maxCount(value: number): GridAttribute;
- /**
- * minCount
- * @since 8
- */
+ /**
+ * minCount
+ * @since 8
+ */
minCount(value: number): GridAttribute;
/**
@@ -166,8 +183,9 @@ declare class GridAttribute extends CommonMethod {
* This callback is triggered when the drag behavior is stopped within the scope of the component.
* @since 8
*/
- onItemDrop(event:
- (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): GridAttribute;
+ onItemDrop(
+ event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
+ ): GridAttribute;
}
declare const Grid: GridInterface;
diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts
index 9474d5f7c62c2a75fe1ad39ad96b25cd967a8456..49465ff58cc663a6fa2f7d492f834889229dd104 100644
--- a/api/@internal/component/ets/image.d.ts
+++ b/api/@internal/component/ets/image.d.ts
@@ -171,12 +171,5 @@ declare class ImageAttribute extends CommonMethod {
onFinish(event: () => void): ImageAttribute;
}
-/**
- * @devices phone, tablet, car
- * @since 7
- */
declare const Image: ImageInterface;
-/**
- * @since 7
- */
declare const ImageInstance: ImageAttribute;
diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts
index c30d4db7291408156145ee3ef344ba6d1000dab7..aa269104fdb4ab6f8372db7265413d7b459cf3b4 100644
--- a/api/@internal/component/ets/image_animator.d.ts
+++ b/api/@internal/component/ets/image_animator.d.ts
@@ -14,6 +14,7 @@
*/
/**
+ * Defines the ImageAnimator Interface.
* @since 7
*/
interface ImageAnimatorInterface {
diff --git a/api/@internal/component/ets/lazy_for_each.d.ts b/api/@internal/component/ets/lazy_for_each.d.ts
index 8498b93cb12817ebde6a80faffd21d5c1d44aea3..65e7c2cdbf88eb1c62303c01164abf6241cf436d 100644
--- a/api/@internal/component/ets/lazy_for_each.d.ts
+++ b/api/@internal/component/ets/lazy_for_each.d.ts
@@ -50,7 +50,7 @@ declare interface DataChangeListener {
}
/**
- * Data changed.
+ * Data changed.
* @since 7
*/
declare interface IDataSource {
@@ -95,7 +95,4 @@ interface LazyForEachInterface {
): LazyForEachInterface;
}
-/**
- * @since 7
- */
declare const LazyForEach: LazyForEachInterface;
diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts
index 8470f64a9b3a7f0d177c389ee4c49af0cba0d9e2..322f7fb52cea0440af6bfbbff28365515bb25c3e 100644
--- a/api/@internal/component/ets/list.d.ts
+++ b/api/@internal/component/ets/list.d.ts
@@ -185,8 +185,5 @@ declare class ListAttribute extends CommonMethod {
onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
}
-/**
- * @since 7
- */
declare const List: ListInterface;
declare const ListInstance: ListAttribute;
diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts
index 96b1afa40ca04b93d1eaad56538f3b031a10ec81..c72b8b44caa401b3534af26f1870bc24d9706b49 100644
--- a/api/@internal/component/ets/list_item.d.ts
+++ b/api/@internal/component/ets/list_item.d.ts
@@ -113,4 +113,3 @@ declare class ListItemAttribute extends CommonMethod {
*/
declare const ListItemInstance: ListItemAttribute;
declare const ListItem: ListItemInterface;
-
diff --git a/api/@internal/component/ets/loading_progress.d.ts b/api/@internal/component/ets/loading_progress.d.ts
index 5bc3c49fd9143fc0c25ddbf99ba3344164968342..2d1ad14dfd53951a27783b7839fd3317c5ac59ba 100644
--- a/api/@internal/component/ets/loading_progress.d.ts
+++ b/api/@internal/component/ets/loading_progress.d.ts
@@ -37,8 +37,6 @@ declare enum LoadingProgressStyle {
Orbital,
}
-
-
/**
* Provides an interface for extending the loading progress.
* @since 8
@@ -71,4 +69,4 @@ declare const LoadingProgress: LoadingProgressInterface;
* Loading Progress Extensions on Declarative Classes
* @since 8
*/
- declare const LoadingProgressInstance: LoadingProgressAttribute
\ No newline at end of file
+declare const LoadingProgressInstance: LoadingProgressAttribute;
diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts
index 05aaf273f822dd40c45e45467b007806db124d2d..aa0c7f2ba6a3331e16495898093bb26256fcb147 100644
--- a/api/@internal/component/ets/middle_class.d.ts
+++ b/api/@internal/component/ets/middle_class.d.ts
@@ -1,623 +1,2351 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSAlphabetIndexerAttribute extends CommonMethod {
- pop(): AlphabetIndexerAttribute;
- debugLine(value: string): AlphabetIndexerAttribute;
- create(value: {
- arrayValue: Array;
- selected: number;
- }): AlphabetIndexerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): AlphabetIndexerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): AlphabetIndexerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { arrayValue: Array; selected: number }): AlphabetIndexerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSAnimatorAttribute extends CommonMethod {
- create(value: string): AnimatorAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: string): AnimatorAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSBadgeAttribute extends CommonMethod {
- pop(): BadgeAttribute;
- debugLine(value: string): BadgeAttribute;
- create(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): BadgeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): BadgeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSBlankAttribute extends CommonMethod {
- create(min?: number | string): BlankAttribute;
- pop(): BlankAttribute;
- debugLine(value: string): BlankAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(min?: number | string): BlankAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): BlankAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): BlankAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSButtonAttribute extends CommonMethod {
- createWithChild(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
- createWithLabel(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
- pop(): ButtonAttribute;
- debugLine(value: string): ButtonAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ createWithChild(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ createWithLabel(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ButtonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ButtonAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCalendarAttribute {
- create(value: {
- date: {
- year: number;
- month: number;
- day: number;
- };
- currentData: MonthData;
- preData: MonthData;
- nextData: MonthData;
- controller?: CalendarController;
- }): CalendarAttribute;
- pop(): CalendarAttribute;
- debugLine(value: string): CalendarAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ date: {
+ year: number;
+ month: number;
+ day: number;
+ };
+ currentData: MonthData;
+ preData: MonthData;
+ nextData: MonthData;
+ controller?: CalendarController;
+ }): CalendarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CalendarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CalendarAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCanvasAttribute extends CommonMethod {
- create(context?: CanvasRenderingContext2D): CanvasAttribute;
- pop(): CanvasAttribute;
- debugLine(value: string): CanvasAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(context?: CanvasRenderingContext2D): CanvasAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CanvasAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CanvasAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCheckboxAttribute extends CommonMethod {
- create(options?: CheckboxOption): CheckboxAttribute;
- pop(): CheckboxAttribute;
- debugLine(value: string): CheckboxAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: CheckboxOption): CheckboxAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CheckboxAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CheckboxAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCheckboxGroupAttribute extends CommonMethod {
- create(options?: CheckboxGroupOption): CheckboxGroupAttribute;
- pop(): CheckboxGroupAttribute;
- debugLine(value: string): CheckboxGroupAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: CheckboxGroupOption): CheckboxGroupAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CheckboxGroupAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CheckboxGroupAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCircleAttribute extends CommonShapeMethod {
- create(value?: CircleOption): CircleAttribute;
- debugLine(value: string): CircleAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: CircleOption): CircleAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CircleAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSColumnAttribute extends CommonMethod {
- create(value?: {
- space?: string | number;
- }): ColumnAttribute;
- pop(): ColumnAttribute;
- debugLine(value: string): ColumnAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { space?: string | number }): ColumnAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ColumnAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ColumnAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSColumnSplitAttribute extends CommonMethod {
- create(): ColumnSplitAttribute;
- pop(): ColumnSplitAttribute;
- debugLine(value: string): ColumnSplitAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): ColumnSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ColumnSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ColumnSplitAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSCounterAttribute extends CommonMethod {
- create(): CounterAttribute;
- pop(): CounterAttribute;
- debugLine(value: string): CounterAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): CounterAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): CounterAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): CounterAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSDataPanelAttribute extends CommonMethod {
- create(options: DataPanelOption): DataPanelAttribute;
- pop(): DataPanelAttribute;
- debugLine(value: string): DataPanelAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: DataPanelOption): DataPanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): DataPanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): DataPanelAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSDatePickerAttribute extends CommonMethod {
- create(options?: DatePickerOption): DatePickerAttribute;
- pop(): DatePickerAttribute;
- debugLine(value: string): DatePickerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: DatePickerOption): DatePickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): DatePickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): DatePickerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSDividerAttribute extends CommonMethod {
- create(): DividerAttribute;
- debugLine(value: string): DividerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): DividerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): DividerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSEllipseAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): EllipseAttribute;
- debugLine(value: string): EllipseAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): EllipseAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): EllipseAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSFlexAttribute extends CommonMethod {
- create(value?: FlexOption): FlexAttribute;
- pop(): FlexAttribute;
- debugLine(value: string): FlexAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: FlexOption): FlexAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): FlexAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): FlexAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSForEachInterface {
- create(arr: Array, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string): ForEachInterface;
- pop(): ForEachInterface;
- debugLine(value: string): ForEachInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ arr: Array,
+ itemGenerator: (item: any, index?: number) => void,
+ keyGenerator?: (item: any, index?: number) => string,
+ ): ForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ForEachInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSFormComponentAttribute extends CommonMethod {
- create(value: {
- id: number;
- name: string;
- bundle: string;
- ability: string;
- module: string;
- dimension?: FormDimension;
- temporary?: boolean;
- }): FormComponentAttribute;
- debugLine(value: string): FormComponentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ id: number;
+ name: string;
+ bundle: string;
+ ability: string;
+ module: string;
+ dimension?: FormDimension;
+ temporary?: boolean;
+ }): FormComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): FormComponentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGaugeAttribute extends CommonMethod {
- create(options: {
- value: number;
- min?: number;
- max?: number;
- }): GaugeAttribute;
- debugLine(value: string): GaugeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: { value: number; min?: number; max?: number }): GaugeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GaugeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGridAttribute extends CommonMethod {
- create(scroller?: Scroller): GridAttribute;
- pop(): GridAttribute;
- debugLine(value: string): GridAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(scroller?: Scroller): GridAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GridAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GridAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGridItemAttribute extends CommonMethod {
- create(): GridItemAttribute;
- pop(): GridItemAttribute;
- debugLine(value: string): GridItemAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): GridItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GridItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GridItemAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGridContainerAttribute extends ColumnAttribute {
- create(value?: GridContainerOption): GridContainerAttribute;
- pop(): GridContainerAttribute;
- debugLine(value: string): GridContainerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: GridContainerOption): GridContainerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GridContainerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): GridContainerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSImageAttribute extends CommonMethod {
- create(src: string | PixelMap | Resource): ImageAttribute;
- debugLine(value: string): ImageAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(src: string | PixelMap | Resource): ImageAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ImageAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSImageAnimatorAttribute extends CommonMethod {
- create(): ImageAnimatorAttribute;
- debugLine(value: string): ImageAnimatorAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): ImageAnimatorAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ImageAnimatorAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLazyForEachInterface {
- create(dataSource: IDataSource, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string): LazyForEachInterface;
- pop(): LazyForEachInterface;
- debugLine(value: string): LazyForEachInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ dataSource: IDataSource,
+ itemGenerator: (item: any, index?: number) => void,
+ keyGenerator?: (item: any, index?: number) => string,
+ ): LazyForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): LazyForEachInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): LazyForEachInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLineAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): LineAttribute;
- debugLine(value: string): LineAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): LineAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): LineAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSListAttribute extends CommonMethod {
- create(value?: {
- initialIndex?: number;
- space?: number | string;
- scroller?: Scroller;
- }): ListAttribute;
- pop(): ListAttribute;
- debugLine(value: string): ListAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { initialIndex?: number; space?: number | string; scroller?: Scroller }): ListAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ListAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ListAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSListItemAttribute extends CommonMethod {
- create(value?: string): ListItemAttribute;
- pop(): ListItemAttribute;
- debugLine(value: string): ListItemAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: string): ListItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ListItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ListItemAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLoadingProgressAttribute extends CommonMethod {
- create(): LoadingProgressAttribute;
- debugLine(value: string): LoadingProgressAttribute;
- color(value: ResourceColor): LoadingProgressAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): LoadingProgressAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): LoadingProgressAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ color(value: ResourceColor): LoadingProgressAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSMarqueeAttribute extends CommonMethod {
- create(value: {
- start: boolean;
- step?: number;
- loop?: number;
- fromStart?: boolean;
- src: string;
- }): MarqueeAttribute;
- pop(): MarqueeAttribute;
- debugLine(value: string): MarqueeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { start: boolean; step?: number; loop?: number; fromStart?: boolean; src: string }): MarqueeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): MarqueeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): MarqueeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSNavigationAttribute extends CommonMethod {
- create(): NavigationAttribute;
- pop(): NavigationAttribute;
- debugLine(value: string): NavigationAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): NavigationAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): NavigationAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): NavigationAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSNavigatorAttribute extends CommonMethod {
- create(value?: {
- target: string;
- type?: NavigationType;
- }): NavigatorAttribute;
- pop(): NavigatorAttribute;
- debugLine(value: string): NavigatorAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { target: string; type?: NavigationType }): NavigatorAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): NavigatorAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): NavigatorAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPageTransitionEnterInterface extends CommonTransition {
- create(value: {
- type?: RouteType;
- duration?: number;
- curve?: Curve | string;
- delay?: number;
- }): PageTransitionEnterInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ type?: RouteType;
+ duration?: number;
+ curve?: Curve | string;
+ delay?: number;
+ }): PageTransitionEnterInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPageTransitionExitInterface extends CommonTransition {
- create(value: {
- type?: RouteType;
- duration?: number;
- curve?: Curve | string;
- delay?: number;
- }): PageTransitionExitInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ type?: RouteType;
+ duration?: number;
+ curve?: Curve | string;
+ delay?: number;
+ }): PageTransitionExitInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPanelAttribute extends CommonMethod {
- create(show: boolean): PanelAttribute;
- pop(): PanelAttribute;
- debugLine(value: string): PanelAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(show: boolean): PanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PanelAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PanelAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPathAttribute extends CommonShapeMethod {
- create(value?: {
- width?: number | string;
- height?: number | string;
- commands?: string;
- }): PathAttribute;
- pop(): PathAttribute;
- debugLine(value: string): PathAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: number | string; height?: number | string; commands?: string }): PathAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PathAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PathAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPatternLockAttribute extends CommonMethod {
- create(controller?: PatternLockController): TSPatternLockAttribute;
- pop(): TSPatternLockAttribute;
- debugLine(value: string): TSPatternLockAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(controller?: PatternLockController): TSPatternLockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TSPatternLockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TSPatternLockAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPieceAttribute extends CommonMethod {
- create(options?: {
- content: string;
- icon?: string;
- }): PieceAttribute;
- pop(): PieceAttribute;
- debugLine(value: string): PieceAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: { content: string; icon?: string }): PieceAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PieceAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PieceAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPluginComponentAttribute extends CommonMethod {
- create(value: {
- template: PluginComponentTemplate;
- data: any;
- }): PluginComponentAttribute;
- pop(): PluginComponentAttribute;
- debugLine(value: string): PluginComponentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PluginComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PluginComponentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPolygonAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): PolygonAttribute;
- debugLine(value: string): PolygonAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): PolygonAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PolygonAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPolylineAttribute extends CommonShapeMethod {
- create(value?: {
- width?: string | number;
- height?: string | number;
- }): PolylineAttribute;
- debugLine(value: string): PolylineAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { width?: string | number; height?: string | number }): PolylineAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): PolylineAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSProgressAttribute extends CommonMethod {
- create(object: {
- value: number;
- total?: number;
- style?: ProgressStyle;
- }): ProgressAttribute;
- debugLine(value: string): ProgressAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(object: { value: number; total?: number; style?: ProgressStyle }): ProgressAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ProgressAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSQRCodeAttribute extends CommonMethod {
- create(value: string): QRCodeAttribute;
- pop(): QRCodeAttribute;
- debugLine(value: string): QRCodeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: string): QRCodeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): QRCodeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): QRCodeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRadioAttribute extends CommonMethod {
- create(options: RadioOption): RadioAttribute;
- debugLine(value: string): RadioAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: RadioOption): RadioAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RadioAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRatingAttribute extends CommonMethod {
- create(options?: {
- rating: number;
- indicator?: boolean;
- }): RatingAttribute;
- pop(): RatingAttribute;
- debugLine(value: string): RatingAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: { rating: number; indicator?: boolean }): RatingAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RatingAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RatingAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRectAttribute extends CommonShapeMethod {
- create(value?: {
- width?: number | string;
- height?: number | string;
- radius?: number | string | Array;
- } | {
- width?: number | string;
- height?: number | string;
- radiusWidth?: number | string;
- radiusHeight?: number | string;
- }): RectAttribute;
- debugLine(value: string): RectAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ value?:
+ | {
+ width?: number | string;
+ height?: number | string;
+ radius?: number | string | Array;
+ }
+ | {
+ width?: number | string;
+ height?: number | string;
+ radiusWidth?: number | string;
+ radiusHeight?: number | string;
+ },
+ ): RectAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RectAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRefreshAttribute extends CommonMethod {
- create(value: {
- refreshing: boolean;
- offset?: number | string;
- friction?: number | string;
- }): RefreshAttribute;
- pop(): RefreshAttribute;
- debugLine(value: string): RefreshAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: { refreshing: boolean; offset?: number | string; friction?: number | string }): RefreshAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RefreshAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RefreshAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRowAttribute extends CommonMethod {
- create(value?: {
- space?: string | number;
- }): RowAttribute;
- pop(): RowAttribute;
- debugLine(value: string): RowAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { space?: string | number }): RowAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RowAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RowAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRowSplitAttribute extends CommonMethod {
- create(): RowSplitAttribute;
- pop(): RowSplitAttribute;
- debugLine(value: string): RowSplitAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): RowSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RowSplitAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RowSplitAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSScrollAttribute extends CommonMethod {
- create(scroller?: Scroller): ScrollAttribute;
- pop(): ScrollAttribute;
- debugLine(value: string): ScrollAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(scroller?: Scroller): ScrollAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ScrollAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ScrollAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSScrollBarAttribute extends CommonMethod {
- create(value: ScrollBarOption): ScrollBarAttribute;
- pop(): ScrollBarAttribute;
- debugLine(value: string): ScrollBarAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: ScrollBarOption): ScrollBarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ScrollBarAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ScrollBarAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSearchAttribute extends CommonMethod {
- create(options?: {
- value?: string;
- placeholder?: string;
- icon?: string;
- controller?: SearchController;
- }): SearchAttribute;
- pop(): SearchAttribute;
- debugLine(value: string): SearchAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: {
+ value?: string;
+ placeholder?: string;
+ icon?: string;
+ controller?: SearchController;
+ }): SearchAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SearchAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SearchAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSelectAttribute extends CommonMethod {
- create(options: Array): SelectAttribute;
- pop(): SelectAttribute;
- debugLine(value: string): SelectAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: Array): SelectAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SelectAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SelectAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSShapeAttribute extends CommonMethod {
- create(value?: PixelMap): ShapeAttribute;
- pop(): ShapeAttribute;
- debugLine(value: string): ShapeAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: PixelMap): ShapeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ShapeAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ShapeAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSheetAttribute extends CommonMethod {
- create(): SheetAttribute;
- pop(): SheetAttribute;
- debugLine(value: string): SheetAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): SheetAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SheetAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SheetAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSliderAttribute extends CommonMethod {
- create(options?: SliderOption): SliderAttribute;
- debugLine(value: string): SliderAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: SliderOption): SliderAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SliderAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSpanAttribute extends CommonMethod {
- create(value: string | Resource): SpanAttribute;
- debugLine(value: string): SpanAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: string | Resource): SpanAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SpanAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSStackAttribute extends CommonMethod {
- create(value?: {
- alignContent?: Alignment;
- }): StackAttribute;
- pop(): StackAttribute;
- debugLine(value: string): StackAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { alignContent?: Alignment }): StackAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): StackAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): StackAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSStepperAttribute extends CommonMethod {
- create(value?: {
- index?: number;
- }): StepperAttribute;
- pop(): StepperAttribute;
- debugLine(value: string): StepperAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { index?: number }): StepperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): StepperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): StepperAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSStepperItemAttribute extends CommonMethod {
- create(): StepperItemAttribute;
- pop(): StepperItemAttribute;
- debugLine(value: string): StepperItemAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): StepperItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): StepperItemAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): StepperItemAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSwiperAttribute extends CommonMethod {
- create(controller?: SwiperController): SwiperAttribute;
- pop(): SwiperAttribute;
- debugLine(value: string): SwiperAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(controller?: SwiperController): SwiperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SwiperAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): SwiperAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTabContentAttribute extends CommonMethod {
- create(): TabContentAttribute;
- pop(): TabContentAttribute;
- debugLine(value: string): TabContentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(): TabContentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TabContentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TabContentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTabsAttribute extends CommonMethod {
- create(value?: {
- barPosition?: BarPosition;
- index?: number;
- controller?: TabsController;
- }): TabsAttribute;
- pop(): TabsAttribute;
- debugLine(value: string): TabsAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TabsAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TabsAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextAttribute extends CommonMethod {
- create(content?: string | Resource): TextAttribute;
- pop(): TextAttribute;
- debugLine(value: string): TextAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(content?: string | Resource): TextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextAreaAttribute extends CommonMethod {
- create(value?: TextAreaOption): TextAreaAttribute;
- debugLine(value: string): TextAreaAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: TextAreaOption): TextAreaAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextAreaAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextClockAttribute extends CommonMethod {
- create(options?: {
- timeZoneOffset?: number;
- controller?: TextClockController;
- }): TextClockAttribute;
- pop(): TextClockAttribute;
- debugLine(value: string): TextClockAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextClockAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextClockAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextInputAttribute extends CommonMethod {
- create(value?: TextInputOption): TextInputAttribute;
- debugLine(value: string): TextInputAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: TextInputOption): TextInputAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextInputAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextPickerAttribute extends CommonMethod {
- create(options?: TextPickerOption): TextPickerAttribute;
- pop(): TextPickerAttribute;
- debugLine(value: string): TextPickerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: TextPickerOption): TextPickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextPickerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextPickerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTextTimerAttribute extends CommonMethod {
- create(options?: TextTimerOption): TextTimerAttribute;
- pop(): TextTimerAttribute;
- debugLine(value: string): TextTimerAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options?: TextTimerOption): TextTimerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TextTimerAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): TextTimerAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSToggleAttribute extends CommonMethod {
- create(options: {
- type: ToggleType;
- isOn?: boolean;
- }): ToggleAttribute;
- pop(): ToggleAttribute;
- debugLine(value: string): ToggleAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(options: { type: ToggleType; isOn?: boolean }): ToggleAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): ToggleAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): ToggleAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSVideoAttribute extends CommonMethod {
- create(value: {
- src?: string | Resource;
- previewUri?: string | PixelMap | Resource;
- controller?: VideoController;
- }): VideoAttribute;
- debugLine(value: string): VideoAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ src?: string | Resource;
+ previewUri?: string | PixelMap | Resource;
+ controller?: VideoController;
+ }): VideoAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): VideoAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSWebAttribute extends CommonMethod {
- create(value: WebOptions): WebAttribute;
- debugLine(value: string): WebAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: WebOptions): WebAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): WebAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSXComponentAttribute extends CommonMethod {
- create(value: {
- id: string;
- type: string;
- libraryname?: string;
- controller?: XComponentController;
- }): XComponentAttribute;
- debugLine(value: string): XComponentAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value: {
+ id: string;
+ type: string;
+ libraryname?: string;
+ controller?: XComponentController;
+ }): XComponentAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): XComponentAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRichTextAttribute {
- create(content: string): RichTextAttribute;
- pop(): RichTextAttribute;
- debugLine(value: string): RichTextAttribute;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(content: string): RichTextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RichTextAttribute;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ debugLine(value: string): RichTextAttribute;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSTapGestureInterface {
- create(value?: {
- count?: number;
- fingers?: number;
- }): TapGestureInterface;
- pop(): TapGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { count?: number; fingers?: number }): TapGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): TapGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSLongPressGestureInterface {
- create(value?: {
- fingers?: number;
- repeat?: boolean;
- duration?: number;
- }): LongPressGestureInterface;
- pop(): LongPressGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): LongPressGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSPanGestureInterface {
- create(value?: {
- fingers?: number;
- direction?: PanDirection;
- distance?: number;
- } | PanGestureOption): PanGestureInterface;
- pop(): PanGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(
+ value?:
+ | {
+ fingers?: number;
+ direction?: PanDirection;
+ distance?: number;
+ }
+ | PanGestureOption,
+ ): PanGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PanGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSSwipeGestureInterface {
- create(value?: {
- fingers?: number;
- direction?: SwipeDirection;
- speed?: number;
- }): SwipeGestureInterface;
- pop(): SwipeGestureInterface;
-}
-
-declare class PinchGestureInterface {
- create(value?: {
- fingers?: number;
- distance?: number;
- }): PinchGestureInterface;
- pop(): PinchGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): SwipeGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+declare class TSPinchGestureInterface {
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; distance?: number }): PinchGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): PinchGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSRotationGestureInterface {
- create(value?: {
- fingers?: number;
- angle?: number;
- }): RotationGestureInterface;
- pop(): RotationGestureInterface;
-}
-
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(value?: { fingers?: number; angle?: number }): RotationGestureInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): RotationGestureInterface;
+}
+
+/**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
declare class TSGestureGroupInterface {
- create(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
- pop(): GestureGroupInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ create(mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
+ /**
+ * Used for TS compiler.
+ * @ignore
+ * @systemapi
+ * @since 8
+ */
+ pop(): GestureGroupInterface;
}
diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts
index 99339284866b4290bd6f4bbee92236d7e1e83c89..47300deaa7180ff98c64873b247e881d45a013a2 100644
--- a/api/@internal/component/ets/plugin_component.d.ts
+++ b/api/@internal/component/ets/plugin_component.d.ts
@@ -18,7 +18,15 @@
* @since 8
*/
interface PluginComponentTemplate {
+ /**
+ * Defines the plugin source name.
+ * @since 8
+ */
source: string;
+ /**
+ * Defines the ability name.
+ * @since 8
+ */
ability: string;
}
@@ -35,6 +43,7 @@ interface PluginComponentInterface {
}
/**
+ * Defines the plugin component attibute functions.
* @since 8
*/
declare class PluginComponentAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts
index 80a73a7da0072c02941a2d75bac9c207d707d251..e4fb5939d009250d2a09ffe328c8d53923870d03 100644
--- a/api/@internal/component/ets/progress.d.ts
+++ b/api/@internal/component/ets/progress.d.ts
@@ -13,6 +13,30 @@
* limitations under the License.
*/
+/**
+ * Defines style option for progress component.
+ * @since 8
+ */
+declare interface ProgressStyleOption {
+ /**
+ * Defines the strokeWidth property.
+ * @since 8
+ */
+ strokeWidth?: Length;
+
+ /**
+ * Defines the scaleCoun property.
+ * @since 8
+ */
+ scaleCount?: number;
+
+ /**
+ * Defines the scaleWidth property.
+ * @since 8
+ */
+ scaleWidth?: Length;
+}
+
/**
* Type of progress bar
* @since 7
@@ -20,35 +44,30 @@
declare enum ProgressStyle {
/**
* Linear progress bar style.
- * @devices phone, tablet, car.
* @since 7
*/
Linear,
/**
* Ring progress bar.
- * @devices phone, tablet, car.
* @since 8
*/
Ring,
/**
* Eclipse progress bar.
- * @devices phone, tablet, car.
* @since 7
*/
Eclipse,
/**
* ScaleRing progress bar.
- * @devices phone, tablet, car.
* @since 8
*/
ScaleRing,
/**
* Capsule progress bar.
- * @devices phone, tablet, car.
* @since 8
*/
Capsule,
@@ -67,6 +86,7 @@ interface ProgressInterface {
}
/**
+ * Defines the progress attibute functions.
* @since 7
*/
declare class ProgressAttribute extends CommonMethod {
@@ -83,17 +103,10 @@ declare class ProgressAttribute extends CommonMethod {
color(value: ResourceColor): ProgressAttribute;
/**
- * Called when the style of the circular progress bar is set.
- * @since 7
- */
- circularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): ProgressAttribute;
-
- /**
- * Called when the style of the cricular progress bar is set.
- * @since 7
- * @deprecated since 7
+ * Called when the style of progress bar is set.
+ * @since 8
*/
- cricularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): ProgressAttribute;
+ style(value: ProgressStyleOption): ProgressAttribute;
}
declare const Progress: ProgressInterface;
diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts
index 61eefc5700dbf0eb1e319b6cb2a7da8f53782371..ecae91dc558eae0032bdb9fcbeb1284cf5dcfbb8 100644
--- a/api/@internal/component/ets/qrcode.d.ts
+++ b/api/@internal/component/ets/qrcode.d.ts
@@ -26,6 +26,7 @@ interface QRCodeInterface {
}
/**
+ * Defines the qrcode attibute functions.
* @since 7
*/
declare class QRCodeAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts
index d3d749404ce749014ed1822b78bc4bb0544b6469..703e0034671e43e91531da8127ca3d3668e387c7 100644
--- a/api/@internal/component/ets/radio.d.ts
+++ b/api/@internal/component/ets/radio.d.ts
@@ -15,20 +15,17 @@
/**
* Input parameter for creating a radio box.
- * @devices phone, tablet, car
* @since 8
*/
declare interface RadioOption {
/**
* Radio group name.
- * @devices phone, tablet, car
* @since 8
*/
group: string;
/**
* Radio name.
- * @devices phone, tablet, car
* @since 8
*/
value: string;
@@ -36,13 +33,11 @@ declare interface RadioOption {
/**
* Provides an interface for creating a radio box.
- * @devices phone, tablet, car
* @since 8
*/
interface RadioInterface {
/**
* Called when a radio box is created.
- * @devices phone, tablet, car
* @since 8
*/
(options: RadioOption): RadioAttribute;
@@ -55,14 +50,12 @@ interface RadioInterface {
declare class RadioAttribute extends CommonMethod {
/**
* Called when the radio box is selected.
- * @devices phone, tablet, car
* @since 8
*/
checked(value: boolean): RadioAttribute;
/**
* Called when the radio box selection status changes.
- * @devices phone, tablet, car
* @since 8
*/
onChange(callback: (isChecked: boolean) => void): RadioAttribute;
diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts
index 09f6740ec75c2a715de42f4595028888695ebe74..7dc8bac49645fcf78bcf7f39fad4be33bcf5fff7 100644
--- a/api/@internal/component/ets/rating.d.ts
+++ b/api/@internal/component/ets/rating.d.ts
@@ -26,6 +26,7 @@ interface RatingInterface {
}
/**
+ * Defines the rating attibute functions.
* @since 7
*/
declare class RatingAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts
index 7ca9aa72fac29aa43129c2a22a796b93113732ea..a20aa44f461e338ca9b44fa8a72d873442127ee1 100644
--- a/api/@internal/component/ets/rect.d.ts
+++ b/api/@internal/component/ets/rect.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides an interface for drawing rectangles.
* @since 7
diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts
index 648528bb7d179112856255d00e3e20e8aa3610f6..2475dc5518269b153f000bc91d96f73b576f7316 100644
--- a/api/@internal/component/ets/refresh.d.ts
+++ b/api/@internal/component/ets/refresh.d.ts
@@ -62,6 +62,7 @@ interface RefreshInterface {
}
/**
+ * Defines the refresh attibute functions.
* @since 8
*/
declare class RefreshAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/row.d.ts b/api/@internal/component/ets/row.d.ts
index 6d723e4b8baf61b87857b95aced6fc55cc2b89ae..f33801c37657346f16fd1c841a354bcf1e3d2136 100644
--- a/api/@internal/component/ets/row.d.ts
+++ b/api/@internal/component/ets/row.d.ts
@@ -26,6 +26,7 @@ interface RowInterface {
}
/**
+ * Defines the row attribute functions.
* @since 7
*/
declare class RowAttribute extends CommonMethod {
@@ -39,7 +40,7 @@ declare class RowAttribute extends CommonMethod {
* Called when the horizontal alignment is set.
* @since 8
*/
- justifyContent(value: FlexAlign): RowAttribute;
+ justifyContent(value: FlexAlign): RowAttribute;
}
declare const Row: RowInterface;
diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts
index 7ea65ec436f8a53a0badd006ea19a777c2aff4c0..4779b3593c9b5022bc09238a5b8ebe6f9244be4b 100644
--- a/api/@internal/component/ets/scroll.d.ts
+++ b/api/@internal/component/ets/scroll.d.ts
@@ -101,6 +101,7 @@ interface ScrollInterface {
}
/**
+ * Defines the scroll attibute functions.
* @since 7
*/
declare class ScrollAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts
index 0a722fca3961cb71eb90b318ef2530f62c8964a3..afccfd11ebbfb4c00dabf97c644a29f689101505 100644
--- a/api/@internal/component/ets/scroll_bar.d.ts
+++ b/api/@internal/component/ets/scroll_bar.d.ts
@@ -68,8 +68,10 @@ interface ScrollBarInterface {
}
/**
+ * Defines the scrollbar attibute functions.
* @since 8
*/
declare class ScrollBarAttribute extends CommonMethod {}
+
declare const ScrollBar: ScrollBarInterface;
declare const ScrollBarInstance: ScrollBarAttribute;
diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts
index 083b948e47a5591ec05453c67190cad015912084..e2c77a2d9e8ea1b2d60c0a04ab3856615d6f5dd2 100644
--- a/api/@internal/component/ets/sidebar.d.ts
+++ b/api/@internal/component/ets/sidebar.d.ts
@@ -1,33 +1,33 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Sets the sidebar style of showing
* @since 8
*/
-declare enum SideBarContainerStyle {
- /**
- * The sidebar invisible
- * @since 8
- */
- Embed,
- /**
- * The sidebar visible
- * @since 8
- */
- Overlay
+declare enum SideBarContainerType {
+ /**
+ * The sidebar invisible
+ * @since 8
+ */
+ Embed,
+ /**
+ * The sidebar visible
+ * @since 8
+ */
+ Overlay,
}
/**
@@ -35,33 +35,37 @@ declare enum SideBarContainerStyle {
* @since 8
*/
declare interface ButtonStyle {
- /**
- * Set the left of control button
- * @since 8
- */
- left?: number;
- /**
- * Set the top of control button
- * @since 8
- */
- top?: number;
- /**
- * Set the width of control button
- * @since 8
- */
- width?: number;
+ /**
+ * Set the left of control button
+ * @since 8
+ */
+ left?: number;
+ /**
+ * Set the top of control button
+ * @since 8
+ */
+ top?: number;
+ /**
+ * Set the width of control button
+ * @since 8
+ */
+ width?: number;
- /**
- * Set the heigth of control button
- * @since 8
- */
- height?: number;
+ /**
+ * Set the heigth of control button
+ * @since 8
+ */
+ height?: number;
- /**
- * Set the button icon when sidebar status has changed
- * @since 8
- */
- icons?: {shown:string | PixelMap | Resource, hidden: string | PixelMap | Resource, switching?: string | PixelMap | Resource}
+ /**
+ * Set the button icon when sidebar status has changed
+ * @since 8
+ */
+ icons?: {
+ shown: string | PixelMap | Resource;
+ hidden: string | PixelMap | Resource;
+ switching?: string | PixelMap | Resource;
+ };
}
/**
@@ -69,21 +73,28 @@ declare interface ButtonStyle {
* @since 8
*/
interface SideBarContainerInterface {
- /**
- * Called when showing the sidebar of a block entry.
- * @since 8
- */
- (options?: { showSideBarContainer?: boolean,
- style?: SideBarContainerStyle,
- buttonAttr?: ButtonStyle}): SideBarContainerAttribute;
+ /**
+ * Called when showing the sidebar of a block entry.
+ * @since 8
+ */
+ (type?: SideBarContainerType): SideBarContainerAttribute;
}
/**
* The attribute function of sidebar
* @since 8
*/
-
declare class SideBarContainerAttribute extends CommonMethod {
+ /**
+ * Callback showControlButton function when setting the status of sidebar
+ * @since 8
+ */
+ showSideBar(value: boolean): SideBarContainerAttribute;
+ /**
+ * Callback controlButton function when setting the style of button
+ * @since 8
+ */
+ controlButton(value: ButtonStyle): SideBarContainerAttribute;
/**
* Callback showControlButton function when setting the status of button
* @since 8
@@ -114,4 +125,4 @@ declare class SideBarContainerAttribute extends CommonMethod extends IPropertySubscriber {
/**
* Provides a single attribute change user interface.
* @since 7
+ * @systemapi
*/
hasChanged(newValue: T): void;
}
/**
+ * Defines the subscribed abstract property.
* @since 7
+ * @systemapi
*/
declare abstract class SubscribedAbstractProperty {
/**
* Setting Subscribers.
* @since 7
+ * @systemapi
*/
protected subscribers_: Set;
/**
* Private user ID.
* @since 7
+ * @systemapi
*/
private id_;
/**
* Private user information.
* @since 7
+ * @systemapi
*/
private info_?;
/**
* @since 7
+ * @systemapi
*/
constructor(
/**
- * Subscriber Information.
+ * Subscriber IPropertySubscriber.
* @since 7
+ * @systemapi
*/
subscribeMe?: IPropertySubscriber,
+ /**
+ * Subscriber info.
+ * @since 7
+ * @systemapi
+ */
info?: string,
);
/**
* Called when the subscriber ID is entered.
* @since 7
+ * @systemapi
*/
id(): number;
/**
* Called when a subscriber information description is entered.
* @since 7
+ * @systemapi
*/
info(): string;
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
*/
abstract get(): T;
/**
* Called when data is created.
* @since 7
+ * @systemapi
*/
abstract set(newValue: T): void;
/**
* Called when a two-way synchronization is created.
* @since 7
+ * @systemapi
*/
createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay;
/**
* Called when a one-way synchronization is created.
* @since 7
+ * @systemapi
*/
createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay;
/**
* Called when the subscriber is unlinked.
* @since 7
+ * @systemapi
*/
unlinkSuscriber(subscriberId: number): void;
/**
* Called when the notification has changed.
* @since 7
+ * @systemapi
*/
protected notifyHasChanged(newValue: T): void;
/**
* Called when the notification property is read.
* @since 7
+ * @systemapi
*/
protected notifyPropertyRead(): void;
/**
* Called when the number of users is queried.
* @since 7
+ * @systemapi
*/
numberOfSubscrbers(): number;
}
/**
+ * Defines the state value.
* @since 7
+ * @systemapi
*/
declare class SyncedPropertyTwoWay
extends SubscribedAbstractProperty
- implements ISinglePropertyChangeSubscriber {
+ implements ISinglePropertyChangeSubscriber
+{
/**
* Sources of synchronization attributes bidirectionally.
* @since 7
+ * @systemapi
*/
private source_;
/**
* constructor parameters.
* @since 7
+ * @systemapi
*/
constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string);
/**
* Called when processing information about to be deleted.
* @since 7
+ * @systemapi
*/
aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void;
/**
* Information Changed.
* @since 7
+ * @systemapi
*/
hasChanged(newValue: T): void;
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
*/
get(): T;
/**
* Called when data is created.
* @since 7
+ * @systemapi
*/
set(newValue: T): void;
}
/**
+ * Defines the prop state value.
* @since 7
+ * @systemapi
*/
declare class SyncedPropertyOneWay
extends SubscribedAbstractProperty
- implements ISinglePropertyChangeSubscriber {
+ implements ISinglePropertyChangeSubscriber
+{
/**
* Pack value for single-item binding.
* @since 7
+ * @systemapi
*/
private wrappedValue_;
/**
* Sources of synchronization attributes bidirectionally.
* @since 7
+ * @systemapi
*/
private source_;
/**
* Constructor parameters.
* @since 7
+ * @systemapi
*/
constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string);
/**
* Called when processing information about to be deleted.
* @since 7
+ * @systemapi
*/
aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void;
/**
* Information Changed.
* @since 7
+ * @systemapi
*/
hasChanged(newValue: T): void;
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
*/
get(): T;
/**
* Called when data is created.
* @since 7
+ * @systemapi
*/
set(newValue: T): void;
}
/**
+ * Defines the AppStorage interface.
* @since 7
*/
declare class AppStorage {
@@ -313,12 +361,15 @@ declare class AppStorage {
}
/**
+ * Defines the Environment interface.
* @since 7
*/
declare class Environment {
/**
* Constructor.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor();
@@ -347,23 +398,25 @@ declare class Environment {
}
/**
+ * Defines the ColorMode of device.
* @since 7
*/
declare enum ColorMode {
/**
- * Bright color.
+ * Light mode.
* @since 7
*/
LIGHT = 0,
/**
- * Dark.
+ * Dark mode.
* @since 7
*/
DARK,
}
/**
+ * Defines the LayoutDirection of device.
* @since 7
*/
declare enum LayoutDirection {
@@ -371,7 +424,7 @@ declare enum LayoutDirection {
* Elements are laid out from left to right.
* @since 7
*/
- LTR = 0,
+ LTR,
/**
* Elements are laid out from right to left.
@@ -383,16 +436,19 @@ declare enum LayoutDirection {
* Elements are laid out from auto.
* @since 8
*/
- Auto
+ Auto,
}
/**
+ * Defines the PersistentStorage interface.
* @since 7
*/
declare class PersistentStorage {
/**
* Constructor parameters.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor(appStorage: AppStorage, storage: Storage);
@@ -427,86 +483,114 @@ declare class PersistentStorage {
}
/**
+ * Defines the base class of storage.
* @since 7
+ * @systemapi
*/
declare class Storage {
/**
* Constructor parameters.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor(needCrossThread?: boolean, file?: string);
/**
* Called when data is obtained.
* @since 7
+ * @systemapi
+ * @hide
*/
get(key: string): string | undefined;
/**
* Called when setting.
* @since 7
+ * @systemapi
+ * @hide
*/
set(key: string, val: any): void;
/**
* Called when data is cleared.
* @since 7
+ * @systemapi
+ * @hide
*/
clear(): void;
/**
* Called when data is deleted.
* @since 7
+ * @systemapi
+ * @hide
*/
delete(key: string): void;
}
/**
+ * Defines the Subscribale base class.
* @since 7
+ * @systemapi
+ * @hide
*/
declare abstract class SubscribaleAbstract {
/**
* Returns the ownership attribute set by the.
* @since 7
+ * @systemapi
+ * @hide
*/
private owningProperties_: Set;
/**
* Constructor.
* @since 7
+ * @systemapi
+ * @hide
*/
constructor();
/**
* Called when the notification property has changed.
* @since 7
+ * @systemapi
+ * @hide
*/
protected notifyPropertyHasChanged(propName: string, newValue: any): void;
/**
* Called when adding an already owned property.
* @since 7
+ * @systemapi
+ * @hide
*/
public addOwningProperty(subscriber: IPropertySubscriber): void;
/**
* Called when an already owned property is deleted.
* @since 7
+ * @systemapi
+ * @hide
*/
public removeOwningProperty(property: IPropertySubscriber): void;
/**
* Called when an already owned property is deleted by ID
* @since 7
+ * @systemapi
+ * @hide
*/
public removeOwningPropertyById(subscriberId: number): void;
}
/**
+ * Defines the content storage interface.
* @since 9
* @StageModelOnly
*/
- declare class ContentStorage {
+declare class ContentStorage {
/**
* Called when a link is set.
* @since 9
@@ -600,6 +684,9 @@ declare abstract class SubscribaleAbstract {
}
/**
+ * Used for ide.
* @since 7
+ * @systemapi
+ * @hide
*/
declare const appStorage: AppStorage;
diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts
index 71338678597a559cd06a3b6ed8c7d736bd953b25..168d6d284137dc5f9de36532b19c3c44584b93b2 100644
--- a/api/@internal/component/ets/stepper.d.ts
+++ b/api/@internal/component/ets/stepper.d.ts
@@ -15,13 +15,11 @@
/**
* Declare the stepper.
-
* @since 8
*/
interface StepperInterface {
/**
* Called when the stepper component is used.
-
* @since 8
*/
(value?: { index?: number }): StepperAttribute;
@@ -34,35 +32,30 @@ interface StepperInterface {
declare class StepperAttribute extends CommonMethod {
/**
* Callback when the finish label is clicked.
-
* @since 8
*/
onFinish(callback: () => void): StepperAttribute;
/**
* Callback when the skip label is clicked.
-
* @since 8
*/
onSkip(callback: () => void): StepperAttribute;
/**
* Callback when the change label is clicked.
-
* @since 8
*/
onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
/**
* Callback when the next label is clicked.
-
* @since 8
*/
onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
/**
* Callback when the previous label is clicked.
-
* @since 8
*/
onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
diff --git a/api/@internal/component/ets/stepper_item.d.ts b/api/@internal/component/ets/stepper_item.d.ts
index 042417cf4c0c916adb3fb8713aec2995e6d24a15..c7e0976f37ad4b64da3ca52491c2b25d1f359978 100644
--- a/api/@internal/component/ets/stepper_item.d.ts
+++ b/api/@internal/component/ets/stepper_item.d.ts
@@ -15,34 +15,29 @@
/**
* ItemState
- * @devices phone, tablet, car
* @since 8
*/
declare enum ItemState {
/**
* Default State
- * @devices phone, tablet, car
* @since 8
*/
Normal,
/**
* Disabled State
- * @devices phone, tablet, car
* @since 8
*/
Disabled,
/**
* Waiting State
- * @devices phone, tablet, car
* @since 8
*/
Waiting,
/**
* Skip State
- * @devices phone, tablet, car
* @since 8
*/
Skip,
@@ -50,53 +45,39 @@ declare enum ItemState {
/**
* Provides an interface for switching the stepperItem view on stepper container.
- * @devices phone, tablet, car
* @since 8
*/
interface StepperItemInterface {
/**
* Called when the stepperItem component is used.
- * @devices phone, tablet, car
* @since 8
*/
(): StepperItemAttribute;
}
/**
- * @devices phone, tablet, car
+ * Defines the stepper item attrbute functions.
* @since 8
*/
declare class StepperItemAttribute extends CommonMethod {
/**
* Called when the value of stepperItem prevLabel is set
- * @devices phone, tablet, car
* @since 8
*/
prevLabel(value: string): StepperItemAttribute;
/**
* Called when the value of stepperItem nextLabel is set
- * @devices phone, tablet, car
* @since 8
*/
nextLabel(value: string): StepperItemAttribute;
/**
* Called when the value of stepperItem status is set
- * @devices phone, tablet, car
* @since 8
*/
status(value?: ItemState): StepperItemAttribute;
}
-/**
- * @devices phone, tablet, car
- * @since 8
- */
declare const StepperItemInstance: StepperItemAttribute;
-
-/**
- * @devices phone, tablet, car
- * @since 8
- */
declare const StepperItem: StepperItemInterface;
diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts
index 217295dd78a4a6df9dadf92fa98ba442b8ca901e..e4664068a3bd885392b2bf76ded74e9e723eaeb2 100644
--- a/api/@internal/component/ets/swiper.d.ts
+++ b/api/@internal/component/ets/swiper.d.ts
@@ -128,6 +128,7 @@ declare interface IndicatorStyle {
}
/**
+ * Defines the swiper attibute functions.
* @since 7
*/
declare class SwiperAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts
index 93b8933721bf9616710a4bb80e117f7a56152652..509d578ff2c4dfef3bf4bc344923f42932ad0be0 100644
--- a/api/@internal/component/ets/tabs.d.ts
+++ b/api/@internal/component/ets/tabs.d.ts
@@ -79,6 +79,7 @@ interface TabsInterface {
}
/**
+ * Defines the tabs attribute functions.
* @since 7
*/
declare class TabsAttribute extends CommonMethod {
@@ -102,24 +103,14 @@ declare class TabsAttribute extends CommonMethod {
/**
* Called when the width of the bar graph is set.
- * @since 7
- */
- barWidth(value: number): TabsAttribute;
-
- /**
- * Called when the height of the bar graph is set.
- * @since 7
- */
- barHeight(value: number): TabsAttribute;
-
- /**
- * Called when the width of the bar graph is set.
+ * Notice: barWidth only supports Number type on 7, supports Length type since 8.
* @since 8
*/
barWidth(value: Length): TabsAttribute;
/**
* Called when the height of the bar graph is set.
+ * Notice: barHeight only supports Number type on 7, supports Length type since 8.
* @since 8
*/
barHeight(value: Length): TabsAttribute;
diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts
index cdd575d2eba1f0b6bfc7f62042e04ea25c61cdc9..aa258e5c47a9c5179bc2d31f33ed1a4bbad793a2 100644
--- a/api/@internal/component/ets/text.d.ts
+++ b/api/@internal/component/ets/text.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides an interface for writing texts.
* @since 7
@@ -121,11 +120,5 @@ declare class TextAttribute extends CommonMethod {
baselineOffset(value: number | string): TextAttribute;
}
-/**
- * @since 7
- */
declare const TextInstance: TextAttribute;
-/**
- * @since 7
- */
-declare const Text: TextInterface;
\ No newline at end of file
+declare const Text: TextInterface;
diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts
index 0bd8669c821a44c3924129fea575ea9758e2ecf0..978ff49deb5f6a585d2f4fadb2dea839615932cf 100644
--- a/api/@internal/component/ets/text_area.d.ts
+++ b/api/@internal/component/ets/text_area.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Provides the method of switching the cursor position.
* @since 8
@@ -134,7 +133,6 @@ declare class TextAreaAttribute extends CommonMethod {
/**
* Called when the input changes.
- * @devices phone, tablet, car.
* @since 7
*/
onChange(callback: (value: string) => void): TextAreaAttribute;
diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts
index 4d2fb2af1938c15ad8e4de17989be4b422ac12f6..a522bb3cc73cdec68cb760fc66414b84576a06d3 100644
--- a/api/@internal/component/ets/text_clock.d.ts
+++ b/api/@internal/component/ets/text_clock.d.ts
@@ -29,8 +29,8 @@ declare class TextClockController {
*/
start();
/**
- * Provides a stop event for textclock.
- * @since 8
+ * Provides a stop event for textclock.
+ * @since 8
*/
stop();
}
@@ -47,7 +47,7 @@ interface TextClockInterface {
* Where a negative value indicates the eastern time zone, for example, -8.
* @since 8
*/
- (options?: {timeZoneOffset?: number, controller?: TextClockController}): TextClockAttribute;
+ (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
}
declare class TextClockAttribute extends CommonMethod {
@@ -98,5 +98,4 @@ declare class TextClockAttribute extends CommonMethod {
}
declare const TextClock: TextClockInterface;
-
declare const TextClockInstance: TextClockAttribute;
diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts
index 8ad8b036d2a55cb38120462ae1c69c43cd0b9d11..88d4ce1cf9e43326075724f42677e249c4de1fa7 100644
--- a/api/@internal/component/ets/text_input.d.ts
+++ b/api/@internal/component/ets/text_input.d.ts
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
/**
* Declare the type of input box
* @since 7
@@ -134,6 +133,7 @@ interface TextInputInterface {
}
/**
+ * Defines the TextInput attribute functions.
* @since 7
*/
declare class TextInputAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts
index 3001ddf1eede63b200a8507c59d17d9c7352385a..d43d3e12ae79c5b19bafba8a6727d681acc02363 100644
--- a/api/@internal/component/ets/text_timer.d.ts
+++ b/api/@internal/component/ets/text_timer.d.ts
@@ -91,10 +91,10 @@ declare class TextTimerAttribute extends CommonMethod {
* @since 8
*/
format(value: string): TextTimerAttribute;
- /**
- * Called when the font color is set.
- * @since 8
- */
+ /**
+ * Called when the font color is set.
+ * @since 8
+ */
fontColor(value: ResourceColor): TextTimerAttribute;
/**
* Called when the font size is set.
@@ -106,15 +106,15 @@ declare class TextTimerAttribute extends CommonMethod {
* @since 8
*/
fontStyle(value: FontStyle): TextTimerAttribute;
- /**
- * Called when the fontWeight is set
- * @since 8
- */
+ /**
+ * Called when the fontWeight is set
+ * @since 8
+ */
fontWeight(value: number | FontWeight | string): TextTimerAttribute;
- /**
- * Called when the fontFamily is set
- * @since 8
- */
+ /**
+ * Called when the fontFamily is set
+ * @since 8
+ */
fontFamily(value: ResourceStr): TextTimerAttribute;
/**
* Called when the timer value is returned.
diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts
index bb8562b1a7898c4afdc86130e52e39b90270b609..b51b5b490ee4ce8f25d7959d29425192be4fb33c 100644
--- a/api/@internal/component/ets/toggle.d.ts
+++ b/api/@internal/component/ets/toggle.d.ts
@@ -38,6 +38,7 @@ declare enum ToggleType {
}
/**
+ * Defines the toggle interface.
* @since 8
*/
interface ToggleInterface {
@@ -49,6 +50,7 @@ interface ToggleInterface {
}
/**
+ * Defines the toggle attibute functions
* @since 8
*/
declare class ToggleAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts
index 0d9d5ba26b6f4f8c3ba12c1f6f61e86e47d8d245..72c00a5679760a174e91c2e37b5ab79ca9e20622 100644
--- a/api/@internal/component/ets/units.d.ts
+++ b/api/@internal/component/ets/units.d.ts
@@ -161,17 +161,88 @@ declare interface Area {
/**
* Defines the position.
- * @since 8
+ * @since 7
*/
declare interface Position {
/**
* Coordinate x of the Position.
- * @since 8
+ * @since 7
*/
- x: Length;
+ x?: Length;
/**
* Coordinate y of the Position.
- * @since 8
+ * @since 7
+ */
+ y?: Length;
+}
+
+/**
+ * Defines the constrain size option.
+ * @since 7
+ */
+declare interface ConstraintSizeOptions {
+ /**
+ * Defines the min width.
+ * @since 7
+ */
+ minWidth?: Length;
+ /**
+ * Defines the max width.
+ * @since 7
+ */
+ maxWidth?: Length;
+ /**
+ * Defines the min height.
+ * @since 7
+ */
+ minHeight?: Length;
+ /**
+ * Defines the max height.
+ * @since 7
+ */
+ maxHeight?: Length;
+}
+
+/**
+ * Defines the size option.
+ * @since 7
+ */
+declare interface SizeOptions {
+ /**
+ * Defines the width.
+ * @since 7
+ */
+ width?: Length;
+ /**
+ * Defines the height.
+ * @since 7
+ */
+ height?: Length;
+}
+
+/**
+ * Defines the option of border.
+ * @since 7
+ */
+declare interface BorderOption {
+ /**
+ * Defines the border width.
+ * @since 7
+ */
+ width?: Length;
+ /**
+ * Defines the border color.
+ * @since 7
+ */
+ color?: ResourceColor;
+ /**
+ * Defines the border radius.
+ * @since 7
+ */
+ radius?: Length;
+ /**
+ * Defines the border style.
+ * @since 7
*/
- y: Length;
+ style?: BorderStyle;
}
diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts
index d80052caf7abe2400a29a624f146b22819f4e770..8083acb3fc88707f2b74f28c013f7da2ede7987c 100644
--- a/api/@internal/component/ets/video.d.ts
+++ b/api/@internal/component/ets/video.d.ts
@@ -36,7 +36,7 @@ declare enum SeekMode {
*/
ClosestKeyframe,
- /**
+ /**
* Seek to frames closest the time point.
* @since 8
*/
@@ -48,67 +48,69 @@ declare enum SeekMode {
* @since 8
*/
declare enum PlaybackSpeed {
- /**
- * 0.75x speed playback.
- * @since 8
- */
- Speed_Forward_0_75_X,
-
- /**
- * 1.00x speed playback.
- * @since 8
- */
- Speed_Forward_1_00_X,
-
- /**
- * 1.25x speed playback.
- * @since 8
- */
- Speed_Forward_1_25_X,
-
- /**
- * 1.75x speed playback.
- * @since 8
- */
- Speed_Forward_1_75_X,
-
- /**
- * 2.00x speed playback.
- * @since 8
- */
- Speed_Forward_2_00_X,
- }
-
- /**
- * @since 7
- */
- interface VideoOption {
- /**
- * src of video.
- * @since 7
- */
- src?: string | Resource;
-
- /**
- * playback rate of video.
- * @since 7
- */
- currentProgressRate?: number | string | PlaybackSpeed;
-
- /**
- * preview uri of video.
- * @since 8
- */
- previewUri?: string | PixelMap | Resource;
-
- /**
- * controller of video.
- * @since 7
- */
- controller?: VideoController;
- }
+ /**
+ * 0.75x speed playback.
+ * @since 8
+ */
+ Speed_Forward_0_75_X,
+
+ /**
+ * 1.00x speed playback.
+ * @since 8
+ */
+ Speed_Forward_1_00_X,
+
+ /**
+ * 1.25x speed playback.
+ * @since 8
+ */
+ Speed_Forward_1_25_X,
+
+ /**
+ * 1.75x speed playback.
+ * @since 8
+ */
+ Speed_Forward_1_75_X,
+
+ /**
+ * 2.00x speed playback.
+ * @since 8
+ */
+ Speed_Forward_2_00_X,
+}
+
+/**
+ * Defines the video options.
+ * @since 7
+ */
+declare interface VideoOption {
+ /**
+ * src of video.
+ * @since 7
+ */
+ src?: string | Resource;
+
+ /**
+ * playback rate of video.
+ * @since 7
+ */
+ currentProgressRate?: number | string | PlaybackSpeed;
+
+ /**
+ * preview uri of video.
+ * @since 8
+ */
+ previewUri?: string | PixelMap | Resource;
+
+ /**
+ * controller of video.
+ * @since 7
+ */
+ controller?: VideoController;
+}
/**
+ * Defines the video controller.
* @since 7
*/
declare class VideoController {
@@ -150,6 +152,7 @@ declare class VideoController {
}
/**
+ * Defines the video interface.
* @since 7
*/
interface VideoInterface {
@@ -161,6 +164,7 @@ interface VideoInterface {
}
/**
+ * Defines the video attribute functions.
* @since 7
*/
declare class VideoAttribute extends CommonMethod {
diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts
index 6c34f1228cdd79bbb2cafafe49153075d5de5968..eba8d735d8b74d80ed9e5768f720a8041bde501f 100755
--- a/api/@internal/component/ets/web.d.ts
+++ b/api/@internal/component/ets/web.d.ts
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
declare enum MessageLevel {
/**
* Debug level.
@@ -27,27 +42,31 @@ declare enum MessageLevel {
* Warn level.
* @since 8
*/
- Warn
+ Warn,
}
-declare enum MixedModeContent {
+/**
+ * Defines the mixed mode.
+ * @since 8
+ */
+declare enum MixedMode {
/**
- * MIXED_CONTENT_ALWAYS_ALLOW level.
+ * Allows all sources.
* @since 8
*/
- MIXED_CONTENT_ALWAYS_ALLOW,
+ ALL,
/**
- * MIXED_CONTENT_NEVER_ALLOW level.
+ * Allows sources Compatibly.
* @since 8
*/
- MIXED_CONTENT_NEVER_ALLOW,
+ Compatible,
/**
- * MIXED_CONTENT_COMPATIBILITY_MODE level.
+ * Don't allow unsecure sources from a secure origin.
* @since 8
*/
- MIXED_CONTENT_COMPATIBILITY_MODE,
+ None,
}
declare enum HitTestType {
@@ -97,26 +116,37 @@ declare enum HitTestType {
* Other unknown hit test.
* @since 8
*/
- Unknown
+ Unknown,
}
+/**
+ * Defines the cache mode interface.
+ * @since 8
+ */
declare enum CacheMode {
/**
* load online and not cache.
+ * @since 8
*/
None,
/**
* Load cache first, then online.
+ * @since 8
*/
Online,
/**
* load cache and not online.
+ * @since 8
*/
- Only
+ Only,
}
+/**
+ * Defines the js result.
+ * @since 8
+ */
declare class JsResult {
/**
* Constructor.
@@ -137,6 +167,10 @@ declare class JsResult {
handleConfirm(): void;
}
+/**
+ * Defines the console message.
+ * @since 8
+ */
declare class ConsoleMessage {
/**
* Constructor.
@@ -177,6 +211,10 @@ declare class ConsoleMessage {
getMessageLevel(): MessageLevel;
}
+/**
+ * Defines the web resource request.
+ * @since 8
+ */
declare class WebResourceRequest {
/**
* Constructor.
@@ -225,6 +263,70 @@ declare class WebResourceRequest {
isRedirect(): boolean;
}
+
+/**
+ * Defines the web resource response.
+ * @since 8
+ */
+ declare class WebResourceResponse {
+ /**
+ * Constructor.
+ * @since 8
+ */
+ constructor();
+
+ /**
+ * Get the response data.
+ *
+ * @return Return the response data.
+ * @since 8
+ */
+ getResponseData(): string;
+
+ /**
+ * Get the response encoding.
+ *
+ * @return Return the response encoding.
+ * @since 8
+ */
+ getResponseEncoding(): string;
+
+ /**
+ * Get the response mime type.
+ *
+ * @return Return the response mime type.
+ * @since 8
+ */
+ getResponseMimeType(): string;
+
+ /**
+ * Get the reason message.
+ *
+ * @return Return the reason message.
+ * @since 8
+ */
+ getReasonMessage(): string;
+
+ /**
+ * Get the response headers.
+ * @return Return the response headers.
+ * @since 8
+ */
+ getResponseHeader() : Map;
+
+ /**
+ * Get the response code.
+ *
+ * @return Return the response code.
+ * @since 8
+ */
+ getResponseCode(): number;
+}
+
+/**
+ * Defines the web resource error.
+ * @since 8
+ */
declare class WebResourceError {
/**
* Constructor.
@@ -249,6 +351,10 @@ declare class WebResourceError {
getErrorCode(): number;
}
+/**
+ * Defines the js geolocation request.
+ * @since 8
+ */
declare class JsGeolocation {
/**
* Constructor.
@@ -258,7 +364,7 @@ declare class JsGeolocation {
/**
* Report the geolocation permission status from users.
- *
+ *
* @param origin The origin that ask for the geolocation permission.
* @param allow The geolocation permission status.
* @param retain Whether to allow the geolocation permission status to be saved to the system.
@@ -267,6 +373,10 @@ declare class JsGeolocation {
invoke(origin: string, allow: boolean, retain: boolean): void;
}
+/**
+ * Defines the js web cookie.
+ * @since 8
+ */
declare class WebCookie {
/**
* Constructor.
@@ -287,6 +397,10 @@ declare class WebCookie {
saveCookie();
}
+/**
+ * Defines the web controller.
+ * @since 8
+ */
declare class WebController {
/**
* Constructor.
@@ -306,6 +420,14 @@ declare class WebController {
*/
onActive(): void;
+ /**
+ * Let the Web zoom by.
+ * @param factor The zoom factor.
+ *
+ * @since 8
+ */
+ zoom(factor: number): void;
+
/**
* Clear the history in the Web.
* @since 8
@@ -316,19 +438,19 @@ declare class WebController {
* Means to load a piece of code and execute JS code in the context of the currently displayed page
* @since 8
*/
- runJavaScript(jscode: string, callback?: (result: string) => void);
+ runJavaScript(options: { script: string; callback?: (result: string) => void });
/**
* Indicates that a piece of code is loaded
* @since 8
*/
- loadData(value: { data: string, mimeType: string, encoding: string, baseUrl?: string, historyUrl?: string });
+ loadData(options: { data: string; mimeType: string; encoding: string; baseUrl?: string; historyUrl?: string });
/**
* Load the given URL
* @since 8
*/
- loadUrl(url: string, additionalHttpHeaders?: Array<{ key: string, value: string }>);
+ loadUrl(options: { url: string; headers?: Array<{ key: string; value: string }> });
/**
* refreshes the current URL.
@@ -346,13 +468,13 @@ declare class WebController {
* Registers the JavaScript object and method list.
* @since 8
*/
- registerJavaScriptProxy(value: { obj: object, name: string, methodList: Array });
+ registerJavaScriptProxy(options: { obj: object; name: string; methodList: Array });
/**
* Deletes a registered JavaScript object with given name.
* @since 8
*/
- deleteJavaScriptProxy(value: { name: string });
+ deleteJavaScriptRegister(name: string);
/**
* Get the type of hit test.
@@ -367,46 +489,57 @@ declare class WebController {
requestFocus();
/**
- * Check whether the web page can go back
- * @since 8
- */
+ * Check whether the web page can go back
+ * @since 8
+ */
accessBackward(): boolean;
/**
- * Check whether the web page can go forward
- * @since 8
- */
+ * Check whether the web page can go forward
+ * @since 8
+ */
accessForward(): boolean;
/**
- * Check whether the web page can go back or forward the given number of steps
- * @since 8
- */
+ * Check whether the web page can go back or forward the given number of steps
+ * @since 8
+ */
accessStep(step: number): boolean;
/**
- * Go back in the history of the web
- * @since 8
- */
+ * Go back in the history of the web
+ * @since 8
+ */
backward();
/**
- * Go forward in the history of the web
- * @since 8
- */
+ * Go forward in the history of the web
+ * @since 8
+ */
forward();
-
}
+/**
+ * Defines the web options.
+ * @since 8
+ */
declare interface WebOptions {
/**
- * Set the address of the web page to be displayed
+ * Set the address of the web page to be displayed.
* @since 8
*/
src: string | Resource;
+ /**
+ * Set the controller of the web.
+ * @since 8
+ */
controller: WebController;
}
+/**
+ * Defines the web interface.
+ * @since 8
+ */
interface WebInterface {
/**
* Set Value.
@@ -415,6 +548,10 @@ interface WebInterface {
(value: WebOptions): WebAttribute;
}
+/**
+ * Defines the web attribute functions.
+ * @since 8
+ */
declare class WebAttribute extends CommonMethod {
/**
* Set whether WebView allows JavaScript scripts to execute
@@ -450,7 +587,7 @@ declare class WebAttribute extends CommonMethod {
* Whether to load HTTP and HTTPS content
* @since 8
*/
- mixedMode(mixedMode: MixedModeContent): WebAttribute;
+ mixedMode(mixedMode: MixedMode): WebAttribute;
/**
* Sets whether the WebView supports zooming using on-screen controls or gestures
@@ -468,9 +605,14 @@ declare class WebAttribute extends CommonMethod {
* Inject the arkUI JS object into H5 and invoke the function of the object in H5.
* @since 8
*/
- javaScriptProxy(javaScriptProxy: { obj: object, name: string, methodList: Array }): WebAttribute;
+ javaScriptProxy(javaScriptProxy: {
+ obj: object;
+ name: string;
+ methodList: Array;
+ controller: WebController;
+ }): WebAttribute;
- /*
+ /**
* Sets whether the Web should save the password.
* @param password {@code ture} means the Web can save the password; {@code false} otherwise.
*
@@ -526,6 +668,14 @@ declare class WebAttribute extends CommonMethod {
*/
databaseAccess(databaseAccess: boolean): WebAttribute;
+ /**
+ * Sets the Web's user agent.
+ * @param userAgent The Web's user agent.
+ *
+ * @since 8
+ */
+ userAgent(userAgent: string): WebAttribute;
+
/**
* Triggered at the end of web page loading
* @since 8
@@ -558,12 +708,12 @@ declare class WebAttribute extends CommonMethod {
/**
* Show prompt to ask for the geolocation permission.
- *
+ *
* @param origin the origin of the resource to get geolocation.
* @param geolocation callback to report geolocation.
* @since 8
*/
- onGeolocationShow(callback: (event?: { origin: string, geolocation: JsGeolocation }) => void): WebAttribute;
+ onGeolocationShow(callback: (event?: { origin: string; geolocation: JsGeolocation }) => void): WebAttribute;
/**
* Get WebView focus callback event
@@ -577,7 +727,7 @@ declare class WebAttribute extends CommonMethod {
* @param callback The triggered function when the web page wants to display a JavaScript alert() dialog.
* @since 8
*/
- onAlert(callback: (event?: { url: string, message: string, result: JsResult }) => boolean): WebAttribute;
+ onAlert(callback: (event?: { url: string; message: string; result: JsResult }) => boolean): WebAttribute;
/**
* Triggered when the web page wants to confirm navigation from JavaScript onbeforeunload.
@@ -585,7 +735,7 @@ declare class WebAttribute extends CommonMethod {
* @param callback The triggered function when the web page wants to confirm navigation from JavaScript onbeforeunload.
* @since 8
*/
- onBeforeUnload(callback: (event?: { message: string, result: JsResult }) => boolean): WebAttribute;
+ onBeforeUnload(callback: (event?: { message: string; result: JsResult }) => boolean): WebAttribute;
/**
* Triggered when the web page wants to display a JavaScript confirm() dialog.
@@ -593,7 +743,7 @@ declare class WebAttribute extends CommonMethod {
* @param callback The Triggered function when the web page wants to display a JavaScript confirm() dialog.
* @since 8
*/
- onConfirm(callback: (event?: {url: string, message: string, result: JsResult }) => boolean): WebAttribute;
+ onConfirm(callback: (event?: { url: string; message: string; result: JsResult }) => boolean): WebAttribute;
/**
* Triggered when the web page receives a JavaScript console message.
@@ -601,7 +751,7 @@ declare class WebAttribute extends CommonMethod {
* @param callback The triggered function when the web page receives a JavaScript console message.
* @since 8
*/
- onConsole(callback: (event?: {message: ConsoleMessage}) => boolean): WebAttribute;
+ onConsole(callback: (event?: { message: ConsoleMessage }) => boolean): WebAttribute;
/**
* Triggered when the web page receives a web resource loading error.
@@ -609,7 +759,7 @@ declare class WebAttribute extends CommonMethod {
* @param callback The triggered function when the web page receives a web resource loading error.
* @since 8
*/
- onErrorReceive(callback: (event?: {request: WebResourceRequest, error: WebResourceError}) => void): WebAttribute;
+ onErrorReceive(callback: (event?: { request: WebResourceRequest; error: WebResourceError }) => void): WebAttribute;
/**
* Triggered when the web page receives a web resource loading HTTP error.
@@ -617,13 +767,23 @@ declare class WebAttribute extends CommonMethod {
* @param callback The triggered function when the web page receives a web resource loading HTTP error.
* @since 8
*/
- onHttpErrorReceive(callback: (event?: {request: WebResourceRequest, error: WebResourceError}) => void): WebAttribute;
+ onHttpErrorReceive(
+ callback: (event?: { request: WebResourceRequest; response: WebResourceResponse }) => void,
+ ): WebAttribute;
/**
* Triggered when download start
* @since 8
*/
- onDownloadStart(callback: (event?: {url: string, userAgent: string, contentDisposition: string, mimetype: string, contentLength: number}) => void): WebAttribute;
+ onDownloadStart(
+ callback: (event?: {
+ url: string;
+ userAgent: string;
+ contentDisposition: string;
+ mimetype: string;
+ contentLength: number;
+ }) => void,
+ ): WebAttribute;
/**
* Triggered when the Web page refreshes accessed history.
@@ -631,7 +791,7 @@ declare class WebAttribute extends CommonMethod {
*
* @since 8
*/
- onRefreshAccessedHistory(callback: (event?: { url: string, refreshed: boolean }) => void): WebAttribute;
+ onRefreshAccessedHistory(callback: (event?: { url: string; refreshed: boolean }) => void): WebAttribute;
/**
* Triggered when the url is about to be loaded.
@@ -648,7 +808,7 @@ declare class WebAttribute extends CommonMethod {
*
* @since 8
*/
- onSslErrorReceive(callback: (event?: { handler: Function, error: object }) => void): WebAttribute;
+ onSslErrorReceive(callback: (event?: { handler: Function; error: object }) => void): WebAttribute;
/**
* Triggered when the render process is exited.
@@ -666,7 +826,7 @@ declare class WebAttribute extends CommonMethod {
*
* @since 8
*/
- onFileSelectorShow(callback: (event?: { callback: Function, fileSelector: object }) => void): WebAttribute;
+ onFileSelectorShow(callback: (event?: { callback: Function; fileSelector: object }) => void): WebAttribute;
}
declare const Web: WebInterface;
diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts
index 9cbc7cb1cd9c0f6264ff0072422e178da1e6d947..d93f4579a04fa056ce34b0ce372fe6ee49f35ba4 100644
--- a/api/@internal/component/ets/xcomponent.d.ts
+++ b/api/@internal/component/ets/xcomponent.d.ts
@@ -32,6 +32,13 @@ declare class XComponentController {
* @systemapi
*/
getXComponentSurfaceId();
+
+ /**
+ * get the context of native XComponent.
+ * @since 8
+ * @systemapi
+ */
+ getXComponentContext();
}
/**
@@ -45,12 +52,7 @@ interface XComponentInterface {
* @since 8
* @systemapi
*/
- (value: {
- id: string;
- type: string;
- libraryname?: string;
- controller?: XComponentController;
- }): XComponentAttribute;
+ (value: { id: string; type: string; libraryname?: string; controller?: XComponentController }): XComponentAttribute;
}
/**
@@ -64,14 +66,14 @@ declare class XComponentAttribute extends CommonMethod {
* @since 8
* @systemapi
*/
- onLoad(callback: (event?: object) => void): XComponentAttribute;
+ onLoad(callback: (event?: object) => void): XComponentAttribute;
/**
* Called when judging whether the xcomponent is destroyed.
* @since 8
* @systemapi
*/
- onDestroy(event: () => void): XComponentAttribute;
+ onDestroy(event: () => void): XComponentAttribute;
}
declare const XComponent: XComponentInterface;
diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts
index e93c7b285fe44b2b8e654613baf2e5b8786cfe96..18cff8475eb22d59cca76a92c7ce6d10701ef7d7 100644
--- a/api/@internal/ets/lifecycle.d.ts
+++ b/api/@internal/ets/lifecycle.d.ts
@@ -31,7 +31,6 @@ import { PacMap } from "../ability/dataAbilityHelper";
*
* @name LifecycleForm
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
*/
export declare interface LifecycleForm {
@@ -39,7 +38,6 @@ export declare interface LifecycleForm {
* Called to return a {@link formBindingData.FormBindingData} object.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the detailed information for creating a {@link formBindingData#FormBindingData}.
* The {@code Want} object must include the form ID, form name, and grid style of the form,
* which can be obtained from {@link formManager#FormParam#IDENTITY_KEY},
@@ -55,7 +53,6 @@ export declare interface LifecycleForm {
* Called when the form provider is notified that a temporary form is successfully converted to a normal form.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the form.
* @return -
* @FAModelOnly
@@ -66,7 +63,6 @@ export declare interface LifecycleForm {
* Called to notify the form provider to update a specified form.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the form to update.
* @return -
* @FAModelOnly
@@ -77,7 +73,6 @@ export declare interface LifecycleForm {
* Called when the form provider receives form events from the system.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param newStatus Indicates the form events occurred. The key in the {@code Map} object indicates the form ID,
* and the value indicates the event type, which can be either {@link formManager#VisibilityType#FORM_VISIBLE}
* or {@link formManager#VisibilityType#FORM_INVISIBLE}. {@link formManager#VisibilityType#FORM_VISIBLE}
@@ -93,7 +88,6 @@ export declare interface LifecycleForm {
* JS forms.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the form on which the message event is triggered, which is provided by
* the client to the form provider.
* @param message Indicates the value of the {@code params} field of the message event. This parameter is
@@ -108,7 +102,6 @@ export declare interface LifecycleForm {
* you want your application, as the form provider, to be notified of form deletion.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param formId Indicates the ID of the deleted form.
* @return -
* @FAModelOnly
@@ -122,7 +115,6 @@ export declare interface LifecycleForm {
* this method returns {@link FormState#DEFAULT} by default.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the description of the form for which the {@link formManager#FormState} is obtained.
* The description covers the bundle name, ability name, module name, form name, and form dimensions.
* @return Returns the {@link formManager#FormState} object.
@@ -136,7 +128,6 @@ export declare interface LifecycleForm {
*
* @name LifecycleApp
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode
* @FAModelOnly
*/
export declare interface LifecycleApp {
@@ -144,7 +135,6 @@ export declare interface LifecycleApp {
* Called back when the state of an ability changes from BACKGROUND to INACTIVE.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -154,7 +144,6 @@ export declare interface LifecycleApp {
* Called back when an ability enters the BACKGROUND state.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -164,7 +153,6 @@ export declare interface LifecycleApp {
* Called back before an ability is destroyed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -174,7 +162,6 @@ export declare interface LifecycleApp {
* Called back when an ability is started for initialization.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -185,7 +172,6 @@ export declare interface LifecycleApp {
* to multi-window mode or from multi-window mode to fullscreen mode.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param isShownInMultiWindow Specifies whether this ability is currently in multi-window mode.
* The value {@code true} indicates the multi-window mode, and {@code false} indicates another mode.
* @param newConfig Indicates the new configuration information about this Page ability.
@@ -199,7 +185,6 @@ export declare interface LifecycleApp {
* Asks a user whether to start the migration.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return Returns {@code true} if the user allows the migration; returns {@code false} otherwise.
* @FAModelOnly
*/
@@ -211,7 +196,6 @@ export declare interface LifecycleApp {
* Scheduler Service requests data from the local ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param data Indicates the user data to save.
* @return Returns {@code true} if the data is successfully saved; returns {@code false} otherwise.
* @FAModelOnly
@@ -225,7 +209,6 @@ export declare interface LifecycleApp {
* notify the user of the successful migration and then exit the local ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param result Indicates the migration result code. The value {@code 0} indicates that the migration is
* successful, and {@code -1} indicates that the migration fails.
* @return -
@@ -239,7 +222,6 @@ export declare interface LifecycleApp {
* is restored.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param data Indicates the user data to restore.
* @return -
* @FAModelOnly
@@ -251,7 +233,6 @@ export declare interface LifecycleApp {
* migration is performed for the ability from the local device to the remote device.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -263,7 +244,6 @@ export declare interface LifecycleApp {
* this method is used only to save temporary states.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param outState Indicates the {@code PacMap} object used for storing user data and states. This
* parameter cannot be null.
* @return -
@@ -277,7 +257,6 @@ export declare interface LifecycleApp {
* states. Generally, this method is called after the {@link #onStart(Want)} method.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param inState Indicates the {@code PacMap} object used for storing data and states. This
* parameter can not be null.
* @return -
@@ -290,7 +269,6 @@ export declare interface LifecycleApp {
* change to the BACKGROUND or ACTIVE state).
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -300,7 +278,6 @@ export declare interface LifecycleApp {
* Called back when an ability enters the ACTIVE state.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -310,7 +287,6 @@ export declare interface LifecycleApp {
* Called when the launch mode of an ability is set to singleton.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the new {@code want} containing information about the ability.
* @return -
* @FAModelOnly
@@ -322,7 +298,6 @@ export declare interface LifecycleApp {
* background and there is no enough memory for running as many background processes as possible.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param level Indicates the memory trim level, which shows the current memory usage status.
* @return -
* @FAModelOnly
@@ -335,7 +310,6 @@ export declare interface LifecycleApp {
*
* @name LifecycleService
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode
* @FAModelOnly
*/
export declare interface LifecycleService {
@@ -344,7 +318,6 @@ export declare interface LifecycleService {
* an ability).
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -354,7 +327,6 @@ export declare interface LifecycleService {
* Called back when Service is started.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the want of Service to start.
* @param startId Indicates the number of times the Service ability has been started. The {@code startId} is
* incremented by 1 every time the ability is started. For example, if the ability has been started
@@ -368,7 +340,6 @@ export declare interface LifecycleService {
* Called back before an ability is destroyed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -378,7 +349,6 @@ export declare interface LifecycleService {
* Called back when a Service ability is first connected to an ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates connection information about the Service ability.
* @return Returns the proxy of the Service ability.
* @FAModelOnly
@@ -389,7 +359,6 @@ export declare interface LifecycleService {
* Called back when all abilities connected to a Service ability are disconnected.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates disconnection information about the Service ability.
* @return -
* @FAModelOnly
@@ -404,7 +373,6 @@ export declare interface LifecycleService {
* called but {@link #terminateSelf} has not.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param want Indicates the want of the Service ability being connected.
* @return -
* @FAModelOnly
@@ -417,7 +385,6 @@ export declare interface LifecycleService {
*
* @name LifecycleData
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAMode
* @FAModelOnly
*/
export declare interface LifecycleData {
@@ -425,7 +392,6 @@ export declare interface LifecycleData {
* Updates one or more data records in the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the database table storing the data to update.
* @param valueBucket Indicates the data to update. This parameter can be null.
* @param predicates Indicates filter criteria. If this parameter is null, all data records will be updated by
@@ -441,7 +407,6 @@ export declare interface LifecycleData {
* Queries one or more data records in the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the database table storing the data to query.
* @param columns Indicates the columns to be queried, in array, for example, {"name","age"}. You should define
* the processing logic when this parameter is null.
@@ -458,7 +423,6 @@ export declare interface LifecycleData {
* Deletes one or more data records. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the database table storing the data to delete.
* @param predicates Indicates filter criteria. If this parameter is null, all data records will be deleted by
* default.
@@ -475,7 +439,6 @@ export declare interface LifecycleData {
* even if the context has changed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the uri to normalize.
* @param callback function specified by framework to receive the result, developer should call this function to
* return the result to framework.
@@ -488,7 +451,6 @@ export declare interface LifecycleData {
* Inserts multiple data records into the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the position where the data is to insert.
* @param valueBuckets Indicates the data to insert.
* @param callback function specified by framework to receive the result, developer should call this function to
@@ -503,7 +465,6 @@ export declare interface LifecycleData {
* The default implementation of this method returns the original uri passed to it.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the uri to denormalize.
* @param callback function specified by framework to receive the result, developer should call this function to
* return the result to framework.
@@ -516,7 +477,6 @@ export declare interface LifecycleData {
* Inserts a data record into the database. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the position where the data is to insert.
* @param valueBucket Indicates the data to insert.
* @param callback function specified by framework to receive the result, developer should call this function to
@@ -530,7 +490,6 @@ export declare interface LifecycleData {
* Opens a file. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the file to open.
* @param mode Indicates the open mode, which can be "r" for read-only access, "w" for write-only access (erasing
* whatever data is currently in the file), "wt" for write access that truncates any existing file,
@@ -547,7 +506,6 @@ export declare interface LifecycleData {
* Obtains the MIME type of files. This method should be implemented by a Data ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the files to obtain.
* @param mimeTypeFilter Indicates the MIME type of the files to obtain. This parameter cannot be set to {@code
* null}.
@@ -565,7 +523,6 @@ export declare interface LifecycleData {
* Called to carry {@code AbilityInfo} to this ability after the ability is initialized.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param info Indicates the {@code AbilityInfo} object containing information about this ability.
* @return -
* @FAModelOnly
@@ -579,7 +536,6 @@ export declare interface LifecycleData {
*
Data abilities supports general data types, including text, HTML, and JPEG.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the uri of the data.
* @param callback function specified by framework to receive the result, developer should call this function to
* return the result to framework.
diff --git a/api/@internal/global.d.ts b/api/@internal/global.d.ts
index 03bc8cc2bc561c9b8c8cc51c0f1fff31acdb9a0e..81dbba645a9123cc5e98d00154ce1ea1808cbf59 100644
--- a/api/@internal/global.d.ts
+++ b/api/@internal/global.d.ts
@@ -13,66 +13,89 @@
* limitations under the License.
*/
+/**
+ * Defines the console info.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 7
+ */
export declare class console {
+ /**
+ * Prints "debug" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static debug(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "log" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static log(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "info" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static info(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "warn" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static warn(message: string, ...arguments: any[]): void;
+
+ /**
+ * Prints "error" logs.
+ * @param message Text to print.
+ * @since 7
+ */
static error(message: string, ...arguments: any[]): void;
}
-export interface Result {
- code: number;
- data: object;
-}
-export interface SubscribeMessageResponse {
- deviceId: string;
- bundleName: string;
- abilityName: string;
- message: string;
-}
-export interface CallAbilityParam {
- bundleName: string;
- abilityName: string;
- messageCode: number;
- abilityType: number;
- data?: object;
- syncOption?: number;
-}
-export interface SubscribeAbilityEventParam {
- bundleName: string;
- abilityName: string;
- messageCode: number;
- abilityType: number;
- syncOption?: number;
-}
-export interface SendMessageOptions {
- deviceId: string;
- bundleName: string;
- abilityName: string;
- message?: string;
- success?: () => void;
- fail?: (data: string, code: number) => void;
- complete?: () => void;
-}
-export interface SubscribeMessageOptions {
- success?: (data: SubscribeMessageResponse) => void;
- fail?: (data: string, code: number) => void;
-}
-export declare class FeatureAbility {
- static callAbility(param: CallAbilityParam): Promise;
- static subscribeAbilityEvent(
- param: SubscribeAbilityEventParam,
- func: Function
- ): Promise;
- static unsubscribeAbilityEvent(
- param: SubscribeAbilityEventParam
- ): Promise;
- static sendMsg(options: SendMessageOptions): void;
- static subscribeMsg(options: SubscribeMessageOptions): void;
- static unsubscribeMsg(): void;
-}
+
+/**
+ * Sets the interval for repeatedly calling a function.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function.
+ * @param delay Indicates the interval between each two calls, in milliseconds. The function will be called after this delay.
+ * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
+ * @returns Returns the timer ID.
+ * @since 7
+ */
export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number;
+
+/**
+ * Sets a timer after which a function will be executed.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function.
+ * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible.
+ * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off.
+ * @returns Returns the timer ID.
+ * @since 7
+ */
export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number;
+
+/**
+ * Cancels the interval set by " setInterval()".
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param intervalID Indicates the timer ID returned by "setInterval()".
+ * @since 7
+ */
export declare function clearInterval(intervalID?: number): void;
+
+/**
+ * Cancels the timer set by "setTimeout()".
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @param timeoutID Indicates the timer ID returned by "setTimeout()".
+ * @since 7
+ */
export declare function clearTimeout(timeoutID?: number): void;
-export declare function createLocalParticleAbility(timeoutID?: number): any;
+
+/**
+ * Defining syscap function.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 8
+ */
+export declare function canIUse(syscap: string): boolean;
diff --git a/api/@ohos.workSchedulerExtension.d.ts b/api/@ohos.WorkSchedulerExtensionAbility.d.ts
similarity index 92%
rename from api/@ohos.workSchedulerExtension.d.ts
rename to api/@ohos.WorkSchedulerExtensionAbility.d.ts
index ffecb73734b6b38751f3e7d593616aaa8bc2ba34..df30bd831e426edec007243471ac505d27209e50 100644
--- a/api/@ohos.workSchedulerExtension.d.ts
+++ b/api/@ohos.WorkSchedulerExtensionAbility.d.ts
@@ -16,13 +16,13 @@
import workScheduler from "./@ohos.workScheduler";
/**
- * Class of the work scheduler extension.
+ * Class of the work scheduler extension ability.
*
* @since 9
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @StageModelOnly
*/
-export default class WorkSchedulerExtension {
+export default class WorkSchedulerExtensionAbility {
/**
* Called back when a work is started.
*
diff --git a/api/@ohos.ability.dataUriUtils.d.ts b/api/@ohos.ability.dataUriUtils.d.ts
index 3b978c07dd07085802a6f2f46ad3ebc2f4ba35c6..af7b6805001a1b4a9e70bf5b40afc7b81447ba2e 100644
--- a/api/@ohos.ability.dataUriUtils.d.ts
+++ b/api/@ohos.ability.dataUriUtils.d.ts
@@ -25,7 +25,7 @@ declare namespace dataUriUtils {
* Obtains the ID attached to the end of the path component of the given uri.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri object from which the ID is to be obtained.
* @return Returns the ID attached to the end of the path component;
*/
@@ -35,7 +35,7 @@ declare namespace dataUriUtils {
* Attaches the given ID to the end of the path component of the given uri.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri string from which the ID is to be obtained.
* @param id Indicates the ID to attach.
* @return Returns the uri object with the given ID attached.
@@ -46,7 +46,7 @@ declare namespace dataUriUtils {
* Deletes the ID from the end of the path component of the given uri.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri object from which the ID is to be deleted.
* @return Returns the uri object with the ID deleted.
*/
@@ -56,7 +56,7 @@ declare namespace dataUriUtils {
* Updates the ID in the specified uri
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri Indicates the uri object to be updated.
* @param id Indicates the new ID.
* @return Returns the updated uri object.
diff --git a/api/@ohos.ability.errorCode.d.ts b/api/@ohos.ability.errorCode.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..155f039766c9f43e869df44ef695970b524b57f8
--- /dev/null
+++ b/api/@ohos.ability.errorCode.d.ts
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ /**
+ * Defines error codes used when starting an ability, for example, featureAbility.ErrorCode.NO_ERROR.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+export enum ErrorCode {
+ /**
+ * Permission denied.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ PERMISSION_DENY = -3,
+
+ /**
+ * Ability not found.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ ABILITY_NOT_FOUND = -2,
+
+ /**
+ * Invalid parameter.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ INVALID_PARAMETER = -1,
+
+ /**
+ * No error.
+ * @since 6
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ NO_ERROR = 0
+}
diff --git a/api/@ohos.ability.featureAbility.d.ts b/api/@ohos.ability.featureAbility.d.ts
index 20b110239b55fe400e17329733f831436d8af0b6..bf53635d1dfa93a324d5a826391ed0b55f8ad8a1 100644
--- a/api/@ohos.ability.featureAbility.d.ts
+++ b/api/@ohos.ability.featureAbility.d.ts
@@ -13,19 +13,19 @@
* limitations under the License.
*/
import { AsyncCallback } from './basic';
+import { Callback } from './basic';
import { Want } from './ability/want';
import { StartAbilityParameter } from './ability/startAbilityParameter';
import { AbilityResult } from './ability/abilityResult';
import { Context } from './app/context';
import { DataAbilityHelper } from './ability/dataAbilityHelper';
import { ConnectOptions } from './ability/connectOptions';
-import { ContinueAbilityOptions } from './ability/continueAbilityOptions';
/**
* A Feature Ability represents an ability with a UI and is designed to interact with users.
* @name featureAbility
* @since 6
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @permission N/A
* @FAModelOnly
*/
@@ -34,7 +34,7 @@ declare namespace featureAbility {
* Obtain the want sended from the source ability.
*
* @since 6
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return -
* @FAModelOnly
@@ -46,7 +46,7 @@ declare namespace featureAbility {
* Starts a new ability.
*
* @since 6
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return -
* @FAModelOnly
@@ -57,7 +57,7 @@ declare namespace featureAbility {
/**
* Obtains the application context.
*
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return Returns the application context.
* @since 6
* @FAModelOnly
@@ -68,7 +68,7 @@ declare namespace featureAbility {
* Starts an ability and returns the execution result when the ability is destroyed.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return Returns the {@link AbilityResult}.
* @FAModelOnly
@@ -81,7 +81,7 @@ declare namespace featureAbility {
* and destroys this Page ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the result to return.
* @return -
* @FAModelOnly
@@ -93,7 +93,7 @@ declare namespace featureAbility {
* Destroys this Page ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -104,7 +104,7 @@ declare namespace featureAbility {
* Obtains the dataAbilityHelper.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the file to open.
* @return Returns the dataAbilityHelper.
* @FAModelOnly
@@ -115,7 +115,7 @@ declare namespace featureAbility {
* Checks whether the main window of this ability has window focus.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return Returns {@code true} if this ability currently has window focus; returns {@code false} otherwise.
* @FAModelOnly
*/
@@ -126,7 +126,7 @@ declare namespace featureAbility {
* Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template.
* @default -
* @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param request The element name of the service ability
* @param options The remote object instance
* @return Returns the number code of the ability connected
@@ -138,24 +138,13 @@ declare namespace featureAbility {
* The callback interface was connect successfully.
* @default -
* @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param connection The number code of the ability connected
* @FAModelOnly
*/
function disconnectAbility(connection: number, callback:AsyncCallback): void;
function disconnectAbility(connection: number): Promise;
- /**
- * Migrates this ability to the given device on the same distributed network.
- * @default -
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
- * @return -
- * @FAModelOnly
- */
- function continueAbility(options: ContinueAbilityOptions, callback: AsyncCallback): void;
- function continueAbility(options: ContinueAbilityOptions): Promise;
-
export enum AbilityWindowConfiguration {
WINDOW_MODE_UNDEFINED = 0,
WINDOW_MODE_FULLSCREEN = 1,
diff --git a/api/@ohos.ability.particleAbility.d.ts b/api/@ohos.ability.particleAbility.d.ts
index fc367272ac775fa8a3e00bb24b67072e7b85b86e..f6d62b65b404768e3f2f1a8016f46eed5207da95 100644
--- a/api/@ohos.ability.particleAbility.d.ts
+++ b/api/@ohos.ability.particleAbility.d.ts
@@ -17,12 +17,14 @@ import { AsyncCallback } from './basic';
import { StartAbilityParameter } from './ability/startAbilityParameter';
import { DataAbilityHelper } from './ability/dataAbilityHelper';
import { NotificationRequest } from './notification/notificationRequest';
+import { ConnectOptions } from './ability/connectOptions';
+import { Want } from './ability/want';
/**
* A Particle Ability represents an ability with service.
* @name particleAbility
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @permission N/A
* @FAModelOnly
*/
@@ -31,7 +33,7 @@ declare namespace particleAbility {
* Service ability uses this method to start a specific ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param parameter Indicates the ability to start.
* @return -
* @FAModelOnly
@@ -43,7 +45,7 @@ declare namespace particleAbility {
* Destroys this service ability.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @return -
* @FAModelOnly
*/
@@ -54,7 +56,7 @@ declare namespace particleAbility {
* Obtains the dataAbilityHelper.
*
* @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @param uri Indicates the path of the file to open.
* @return Returns the dataAbilityHelper.
* @FAModelOnly
@@ -85,5 +87,27 @@ declare namespace particleAbility {
*/
function cancelBackgroundRunning(callback: AsyncCallback): void;
function cancelBackgroundRunning(): Promise;
+
+ /**
+ * Connects an ability to a Service ability.
+ *
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param request Indicates the Service ability to connect.
+ * @param options Callback object for the client. If this parameter is null, an exception is thrown.
+ * @return unique identifier of the connection between the client and the service side.
+ * @FAModelOnly
+ */
+ function connectAbility(request: Want, options:ConnectOptions ): number;
+
+ /**
+ * Disconnects ability to a Service ability.
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @param connection the connection id returned from connectAbility api.
+ * @FAModelOnly
+ */
+ function disconnectAbility(connection: number, callback:AsyncCallback): void;
+ function disconnectAbility(connection: number): Promise;
}
export default particleAbility;
diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts
index a0483c0095fcfbf5e8e4f9234deda55e593836a7..9248cae8999ee135000f740255f9b965bdf5b5e6 100644
--- a/api/@ohos.ability.wantConstant.d.ts
+++ b/api/@ohos.ability.wantConstant.d.ts
@@ -17,7 +17,7 @@
* the constant for action and entity in the want
* @name wantConstant
* @since 6
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
declare namespace wantConstant {
@@ -25,7 +25,7 @@ declare namespace wantConstant {
* the constant for action of the want
* @name Action
* @since 6
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
export enum Action {
@@ -221,7 +221,7 @@ declare namespace wantConstant {
* the constant for Entity of the want
* @name Action
* @since 6
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
export enum Entity {
@@ -293,14 +293,14 @@ declare namespace wantConstant {
/**
* Indicates the grant for possible persisting on the URI.
*
- * @hide
+ * @systemapi Hide this for inner system use.
*/
FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040,
/**
* Returns the result to the source ability slice.
*
- * @hide
+ * @systemapi Hide this for inner system use.
*/
FLAG_AUTH_PREFIX_URI_PERMISSION = 0x00000080,
@@ -318,7 +318,7 @@ declare namespace wantConstant {
/**
* Indicates the continuation is reversible.
*
- * @hide
+ * @systemapi Hide this for inner system use.
*/
FLAG_ABILITY_CONTINUATION_REVERSIBLE = 0x00000400,
diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts
index a08f33eac576ebfa78272b0e913b12dacecb679f..1d06c863abfa0a8075260223003401d92cf1c474 100644
--- a/api/@ohos.account.appAccount.d.ts
+++ b/api/@ohos.account.appAccount.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -194,7 +194,7 @@ declare namespace appAccount {
*
* @since 7
* @return Returns a list of application accounts.
- * @permission ohos.permission.GET_ACCOUNTS_PRIVILEGED.
+ * @permission ohos.permission.GET_ALL_APP_ACCOUNTS.
*/
getAllAccessibleAccounts(callback: AsyncCallback>): void;
getAllAccessibleAccounts(): Promise>;
@@ -212,7 +212,7 @@ declare namespace appAccount {
* @since 7
* @param owner Indicates the account owner of your application or third-party applications.
* @return Returns a list of application accounts.
- * @permission ohos.permission.GET_ACCOUNTS_PRIVILEGED.
+ * @permission ohos.permission.GET_ALL_APP_ACCOUNTS.
*/
getAllAccounts(owner: string, callback: AsyncCallback>): void;
getAllAccounts(owner: string): Promise>;
@@ -269,7 +269,7 @@ declare namespace appAccount {
* @since 7
* @return void
*/
- off(type: 'change', callback?: Callback): void;
+ off(type: 'change', callback?: Callback>): void;
/**
* Authenticates an application account to get an oauth token.
@@ -326,7 +326,7 @@ declare namespace appAccount {
deleteOAuthToken(name: string, owner: string, authType: string, token: string): Promise;
/**
- * Sets the oauth token visibility of the specifed authentication type to a third-party application.
+ * Sets the oauth token visibility of the specified authentication type to a third-party application.
*
* Only the owner of the application account has the permission to call this method.
*
@@ -341,7 +341,7 @@ declare namespace appAccount {
setOAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise;
/**
- * Checks the oauth token visibility of the specifed authentication type for a third-party application.
+ * Checks the oauth token visibility of the specified authentication type for a third-party application.
*
* Only the owner of the application account has the permission to call this method.
*
diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts
index 33ba7f02e20789e9f61c298cf7834330eba5caef..38a0fa43bd19d003d967e3f1c7759eefd2c32ec5 100644
--- a/api/@ohos.account.distributedAccount.d.ts
+++ b/api/@ohos.account.distributedAccount.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts
index 9229e35f59653bda9ede893ff9f339062254852a..703c36b1f37f2cf19e6223ba85f07080dac6bfc9 100644
--- a/api/@ohos.account.osAccount.d.ts
+++ b/api/@ohos.account.osAccount.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -64,11 +64,11 @@ declare namespace osAccount {
isMultiOsAccountEnable(): Promise;
/**
- * Checks whether an OS account is actived based on its local ID.
+ * Checks whether an OS account is activated based on its local ID.
*
* @since 7
* @param localId Indicates the local ID of the OS account.
- * @return Returns {@code true} if the OS account is actived; returns {@code false} otherwise.
+ * @return Returns {@code true} if the OS account is activated; returns {@code false} otherwise.
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS/ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
*/
isOsAccountActived(localId: number, callback: AsyncCallback): void;
@@ -466,7 +466,7 @@ declare namespace osAccount {
serialNumber: number;
/**
- * Os account is actived or not.
+ * Os account is activated or not.
* @since 8
*/
isActived: boolean;
diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts
index 2f306abcc6f27540380af20e75ef2238c5f37250..3f4360181c446781c2a3284436bcfc7dc5f5265a 100644
--- a/api/@ohos.animator.d.ts
+++ b/api/@ohos.animator.d.ts
@@ -14,14 +14,14 @@
*/
/**
- * @devices phone, tablet, wearable, tv, car
+ * Defines the animator options.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
*/
export interface AnimatorOptions {
/**
* Duration of the animation, in milliseconds.
* The default value is 0.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
duration: number;
@@ -44,7 +44,6 @@ export interface AnimatorOptions {
* cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1.
* Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
* The default value is ease.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
easing: string;
@@ -52,7 +51,6 @@ export interface AnimatorOptions {
/**
* Delay for the animation start. The default value indicates no delay.
* The default value is 0.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
delay: number;
@@ -61,7 +59,6 @@ export interface AnimatorOptions {
* Whether to resume to the initial state after the animation is executed.
* none: The initial state is restored after the animation is executed.
* forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
fill: "none" | "forwards" | "backwards" | "both";
@@ -69,7 +66,6 @@ export interface AnimatorOptions {
/**
* The animation playback mode.
* The default value is "normal".
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
direction: "normal" | "reverse" | "alternate" | "alternate-reverse";
@@ -77,7 +73,6 @@ export interface AnimatorOptions {
/**
* Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations.
* The default value is 1.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
iterations: number;
@@ -85,7 +80,6 @@ export interface AnimatorOptions {
/**
* Starting point of animator interpolation.
* The default value is 0.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
begin: number;
@@ -93,77 +87,74 @@ export interface AnimatorOptions {
/**
* Ending point of Dynamic Interpolation
* The default value is 1.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
end: number;
}
+/**
+ * Defines the Animator result interface.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 6
+ */
export interface AnimatorResult {
/**
* Update the options for current animator.
* @param options Options.
+ * @since 6
*/
update(options: AnimatorOptions): void;
/**
* Starts the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
play(): void;
/**
* Ends the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
finish(): void;
/**
* Pauses the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
pause(): void;
/**
* Cancels the animation.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
cancel(): void;
/**
* Plays the animation in reverse direction.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
reverse(): void;
/**
* Trigger when vsync callback.
* @param progress The current progress of animtion
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
onframe: (progress: number) => void;
/**
* The animation is finished.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
onfinish: () => void;
/**
* The animation is canceled.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
oncancel: () => void;
/**
* The animation is repeated.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
onrepeat: () => void;
}
/**
- * @devices phone, tablet, wearable, tv, car
+ * Defines the Animator class.
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
* @import prompt from '@ohos.animator';
*/
@@ -171,7 +162,6 @@ export default class Animator {
/**
* Create an animator object for custum animation.
* @param options Options.
- * @devices phone, tablet, wearable, tv, car
* @since 6
*/
static createAnimator(options: AnimatorOptions): AnimatorResult;
diff --git a/api/@ohos.app.abilityManager.d.ts b/api/@ohos.app.abilityManager.d.ts
deleted file mode 100644
index 9b430de3ca7765df86929782bae19ee36ffc4cc4..0000000000000000000000000000000000000000
--- a/api/@ohos.app.abilityManager.d.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { AsyncCallback } from './basic';
-import { AbilityMissionInfo } from './app/abilityMissionInfo';
-import { ActiveProcessInfo } from './app/activeProcessInfo';
-import { MissionSnapshot } from './app/missionSnapshot';
-
-/**
- * This module provides the capability to manage abilities and obtaining system task information.
- *
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @import import abilityManager from '@ohos.app.abilityManager'
- * @permission N/A
- */
-declare namespace abilityManager {
-
- enum ProcessErrCode {
- NO_ERROR = 0,
- CRASHED,
- NO_RESPONSE,
- }
-
-
- /**
- * Get information about running processes
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @return a list of ActiveProcessInfo records describing each process.
- * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
- * @systemapi hide this for inner system use
- */
- function getActiveProcessInfos(): Promise>;
- function getActiveProcessInfos(callback: AsyncCallback>): void;
-
- /**
- * Get information about the running ability missions
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param upperLimit The maximum number of mission infos to return in the array.
- * @return an array of AbilityMissionInfo records describing each active mission.
- * @permission ohos.permission.ACCESS_MISSIONS
- * @systemapi hide this for inner system use
- */
- function getActiveAbilityMissionInfos(upperLimit: number): Promise>;
- function getActiveAbilityMissionInfos(upperLimit: number, callback: AsyncCallback>): void;
-
- /**
- * Get information about recently run missions
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param upperLimit The maximum number of previous mission infos to return in the array.
- * @return an array of AbilityMissionInfo records describing each of the previous mission.
- * @permission ohos.permission.ACCESS_MISSIONS_EXTRA
- * @systemapi hide this for inner system use
- */
- function getPreviousAbilityMissionInfos(upperLimit: number): Promise>;
- function getPreviousAbilityMissionInfos(upperLimit: number, callback: AsyncCallback>): void;
-
- /**
- * Delete the specified missions
- * @since 7
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
- * @param missionIds An array of missions, representing the missions that need to be deleted.
- * @permission ohos.permission.DELETE_MISSIONS
- * @systemapi hide this for inner system use
- */
- function deleteMissions(missionIds: Array): Promise;
- function deleteMissions(missionIds: Array, callback: AsyncCallback): void;
-}
-
-export default abilityManager;
diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts
index 65963be527b5e0901076ed6d413728e4407f4a79..8a19baf2bb13055826e0af9c1a01c0435d6de2b0 100755
--- a/api/@ohos.application.Ability.d.ts
+++ b/api/@ohos.application.Ability.d.ts
@@ -20,21 +20,51 @@ import window from './@ohos.window';
import { Configuration } from './@ohos.application.Configuration';
import rpc from '/@ohos.rpc';
+/**
+ * The prototype of the listener function interface registered by the Caller.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @permission N/A
+ * @param msg Monitor status notification information.
+ * @return -
+ * @StageModelOnly
+ */
+export interface OnReleaseCallBack {
+ (msg: string): void;
+}
+
+/**
+ * The prototype of the message listener function interface registered by the Callee.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @permission N/A
+ * @param indata Notification data notified from the caller.
+ * @return rpc.Sequenceable
+ * @StageModelOnly
+ */
+export interface CaleeCallBack {
+ (indata: rpc.MessageParcel): rpc.Sequenceable;
+}
+
/**
* The interface of a Caller.
*
* @since 9
- * @sysCap AAFwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @permission N/A
* @StageModelOnly
*/
- interface Caller {
+export interface Caller {
/**
* Notify the server of Sequenceable type data.
*
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param method The notification event string listened to by the callee.
+ * @param data Notification data to the callee.
+ * @return -
* @StageModelOnly
*/
call(method: string, data: rpc.Sequenceable): Promise;
@@ -43,8 +73,10 @@ import rpc from '/@ohos.rpc';
* Notify the server of Sequenceable type data and return the notification result.
*
* @since 9
- * @sysCap AAFwk
- * return Sequenceable data
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param method The notification event string listened to by the callee.
+ * @param data Notification data to the callee.
+ * @return Returns the callee's notification result data on success, and returns undefined on failure.
* @StageModelOnly
*/
callWithResult(method: string, data: rpc.Sequenceable): Promise;
@@ -53,8 +85,8 @@ import rpc from '/@ohos.rpc';
* Clear service records.
*
* @since 9
- * @sysCap AAFwk
- * return Sequenceable data
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @return -
* @StageModelOnly
*/
release(): void;
@@ -63,38 +95,43 @@ import rpc from '/@ohos.rpc';
* Register death listener notification callback.
*
* @since 9
- * @sysCap AAFwk
- * return Sequenceable data
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param callback Register a callback function for listening for notifications.
+ * @return -
* @StageModelOnly
*/
- onRelease(callback: function): void;
+ onRelease(callback: OnReleaseCallBack): void;
}
/**
* The interface of a Callee.
*
* @since 9
- * @sysCap AAFwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @permission N/A
* @StageModelOnly
*/
- interface Callee {
+export interface Callee {
/**
* Register data listener callback.
*
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param method A string registered to listen for notification events.
+ * @param callback Register a callback function that listens for notification events.
+ * @return -
* @StageModelOnly
*/
- on(method: string, callback: function): void;
+ on(method: string, callback: CaleeCallBack): void;
/**
* Unregister data listener callback.
*
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param method A string registered to listen for notification events.
+ * @return -
* @StageModelOnly
*/
off(method: string): void;
@@ -104,7 +141,7 @@ import rpc from '/@ohos.rpc';
* The class of an ability.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @permission N/A
* @StageModelOnly
*/
@@ -113,7 +150,7 @@ export default class Ability {
* Indicates configuration information about an ability context.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
*/
context: AbilityContext;
@@ -122,7 +159,7 @@ export default class Ability {
* Indicates ability launch want.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
*/
launchWant: Want;
@@ -131,7 +168,7 @@ export default class Ability {
* Indicates ability last request want.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
*/
lastRequestWant: Want;
@@ -140,7 +177,7 @@ export default class Ability {
* Call Service Stub Object.
*
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
*/
callee: Callee;
@@ -149,7 +186,9 @@ export default class Ability {
* Called back when an ability is started for initialization.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param want Indicates the want info of the created ability.
+ * @param param Indicates the launch param.
* @return -
* @StageModelOnly
*/
@@ -159,7 +198,8 @@ export default class Ability {
* Called back when an ability window stage is created.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param windowStage Indicates the created WindowStage.
* @return -
* @StageModelOnly
*/
@@ -169,17 +209,28 @@ export default class Ability {
* Called back when an ability window stage is destroyed.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @return -
* @StageModelOnly
*/
onWindowStageDestroy(): void;
+ /**
+ * Called back when an ability window stage is restored.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param windowStage window stage to restore
+ * @return -
+ * @StageModelOnly
+ */
+ onWindowStageRestore(windowStage: window.WindowStage): void;
+
/**
* Called back before an ability is destroyed.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @return -
* @StageModelOnly
*/
@@ -189,7 +240,7 @@ export default class Ability {
* Called back when the state of an ability changes to foreground.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @return -
* @StageModelOnly
*/
@@ -199,7 +250,7 @@ export default class Ability {
* Called back when the state of an ability changes to background.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @return -
* @StageModelOnly
*/
@@ -209,7 +260,8 @@ export default class Ability {
* Called back when an ability prepares to migrate.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param wantParam Indicates the want parameter.
* @return true if ability agrees to migrate and saves data successfully, otherwise false.
* @StageModelOnly
*/
@@ -219,9 +271,9 @@ export default class Ability {
* Called when the launch mode of an ability is set to singleton.
* This happens when you re-launch an ability that has been at the top of the ability stack.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param want Indicates the want info of ability.
* @return -
* @StageModelOnly
*/
@@ -230,9 +282,9 @@ export default class Ability {
/**
* Called when the system configuration is updated.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @param config Indicates the updated configuration.
* @return -
* @StageModelOnly
*/
diff --git a/api/@ohos.application.AbilityConstant.d.ts b/api/@ohos.application.AbilityConstant.d.ts
index d2691c2e98cdb1048738e380ceffe927876e5dfb..e43db61c8a1c4d1ab277e8b228cae536fcb11eb4 100644
--- a/api/@ohos.application.AbilityConstant.d.ts
+++ b/api/@ohos.application.AbilityConstant.d.ts
@@ -17,7 +17,7 @@
* The definition of AbilityConstant.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @permission N/A
* @StageModelOnly
*/
@@ -26,7 +26,7 @@ declare namespace AbilityConstant {
* Interface of launch param.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
export interface LaunchParam {
@@ -34,7 +34,7 @@ declare namespace AbilityConstant {
* Indicates launch reason.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
launchReason: LaunchReason;
@@ -43,7 +43,7 @@ declare namespace AbilityConstant {
* Indicates last exit reason.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
lastExitReason: LastExitReason;
@@ -53,7 +53,7 @@ declare namespace AbilityConstant {
* Type of launch reason.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
export enum LaunchReason {
@@ -67,7 +67,7 @@ declare namespace AbilityConstant {
* Type of last exit reason.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
export enum LastExitReason {
diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts
index 7d1762c145c62798083d80e1da61e1aae9809520..ae3a53612f466a5b9de20467dde06bd0733cb572 100644
--- a/api/@ohos.application.AbilityStage.d.ts
+++ b/api/@ohos.application.AbilityStage.d.ts
@@ -48,10 +48,12 @@ export default class AbilityStage {
/**
* Called back when start specified ability.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @return -
+ * @param want Indicates the want info of startd ability.
+ * @return The user returns an ability string ID. If the ability of this ID has been started before,
+ * do not create a new instance and pull it back to the top of the stack.
+ * Otherwise, create a new instance and start it.
* @StageModelOnly
*/
onAcceptWant(want: Want): string;
@@ -61,6 +63,7 @@ export default class AbilityStage {
*
* @since 9
* @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @param config Indicates the updated configuration.
* @return -
* @StageModelOnly
*/
diff --git a/api/@ohos.application.Configuration.d.ts b/api/@ohos.application.Configuration.d.ts
index 9acbda4fa5ba669522f1ead499705f9fb036064e..f00b528ddf7fa6039c6e630a6571f830b40793a0 100644
--- a/api/@ohos.application.Configuration.d.ts
+++ b/api/@ohos.application.Configuration.d.ts
@@ -43,7 +43,7 @@ export interface Configuration {
/**
* Indicates the screen direction of the current device.
*
- * @since 8
+ * @since 9
* @syscap SystemCapability.Ability.AbilityBase
*/
direction: ConfigurationConstant.Direction;
@@ -51,7 +51,7 @@ export interface Configuration {
/**
* Indicates the screen density of the current device.
*
- * @since 8
+ * @since 9
* @syscap SystemCapability.Ability.AbilityBase
*/
screenDensity: ConfigurationConstant.ScreenDensity;
@@ -59,7 +59,7 @@ export interface Configuration {
/**
* Indicates the displayId of the current device.
*
- * @since 8
+ * @since 9
* @syscap SystemCapability.Ability.AbilityBase
*/
displayId: number;
diff --git a/api/@ohos.application.ConfigurationConstant.d.ts b/api/@ohos.application.ConfigurationConstant.d.ts
index b9ed5f3e19e620af0b740b26577a639825afa721..cdf3b32724869aa6705e85d53a58b7dddbff196f 100644
--- a/api/@ohos.application.ConfigurationConstant.d.ts
+++ b/api/@ohos.application.ConfigurationConstant.d.ts
@@ -35,7 +35,7 @@
/**
* @name Direction
- * @since 8
+ * @since 9
* @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
@@ -47,7 +47,7 @@
/**
* @name ScreenDensity
- * @since 8
+ * @since 9
* @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
diff --git a/api/@ohos.application.DataShareExtensionAbility.d.ts b/api/@ohos.application.DataShareExtensionAbility.d.ts
index dce6c206a8ff9926c35894233dfb8fa8da70de1d..495ac85091bc5345c5e121f2de3f95345f4b063e 100644
--- a/api/@ohos.application.DataShareExtensionAbility.d.ts
+++ b/api/@ohos.application.DataShareExtensionAbility.d.ts
@@ -62,7 +62,7 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the MIME type of the matched files; returns null if there is no type that matches the Data
*/
- getFileTypes?(uri: string, mimeTypeFilter: string): Array;
+ getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback>): void;
/**
* Inserts a data record into the database. This method should be implemented by a data share.
@@ -74,7 +74,7 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the index of the newly inserted data record.
*/
- insert?(uri: string, valueBucket: rdb.ValuesBucket): number;
+ insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback): void;
/**
* Updates one or more data records in the database. This method should be implemented by a data share.
@@ -88,7 +88,8 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the number of data records updated.
*/
- update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): number;
+ update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates,
+ callback: AsyncCallback): void;
/**
* Deletes one or more data records. This method should be implemented by a data share.
@@ -101,7 +102,7 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the number of data records deleted.
*/
- delete?(uri: string, predicates: dataAbility.DataAbilityPredicates): number;
+ delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void;
/**
* Queries one or more data records in the database. This method should be implemented by a data share.
@@ -116,7 +117,8 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the queried data.
*/
- query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): ResultSet;
+ query?(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates,
+ callback: AsyncCallback): void;
/**
* Obtains the MIME type matching the data specified by the URI of the data share. This method should be
@@ -130,7 +132,7 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the MIME type that matches the data specified by {@code uri}.
*/
- getType?(uri: string): string;
+ getType?(uri: string, callback: AsyncCallback): void;
/**
* Inserts multiple data records into the database. This method should be implemented by a data share.
@@ -142,7 +144,7 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the number of data records inserted.
*/
- batchInsert?(uri: string, valueBuckets: Array): number;
+ batchInsert?(uri: string, valueBuckets: Array, callback: AsyncCallback): void;
/**
* Converts the given {@code uri} that refer to the data share into a normalized URI. A normalized URI can be
@@ -155,7 +157,7 @@ export default class DataShareExtensionAbility {
* @systemapi Hide this for inner system use.
* @return Returns the normalized uri if the data share supports URI normalization;
*/
- normalizeUri?(uri: string): string;
+ normalizeUri?(uri: string, callback: AsyncCallback): void;
/**
* Converts the given normalized {@code uri} generated by {@link #normalizeUri(uri)} into a denormalized one.
@@ -169,5 +171,5 @@ export default class DataShareExtensionAbility {
* {@code uri} passed to this method if there is nothing to do; returns {@code null} if the data identified by
* the original {@code uri} cannot be found in the current environment.
*/
- denormalizeUri?(uri: string): string;
+ denormalizeUri?(uri: string, callback: AsyncCallback): void;
}
\ No newline at end of file
diff --git a/api/@ohos.application.ServiceExtension.d.ts b/api/@ohos.application.ServiceExtension.d.ts
index 002684069a63fda834df098140a46b339d008254..8ef9102c89638a0bb3a484ca64d1b2c43c1df24d 100644
--- a/api/@ohos.application.ServiceExtension.d.ts
+++ b/api/@ohos.application.ServiceExtension.d.ts
@@ -42,6 +42,7 @@ export default class ServiceExtension {
*
* @since 9
* @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @param want Indicates the want of created service extension.
* @systemapi hide for inner use.
* @return -
* @StageModelOnly
@@ -116,6 +117,7 @@ export default class ServiceExtension {
*
* @since 9
* @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @param config Indicates the updated configuration.
* @return -
* @StageModelOnly
*/
diff --git a/api/@ohos.application.ServiceExtAbility.d.ts b/api/@ohos.application.ServiceExtensionAbility.d.ts
similarity index 72%
rename from api/@ohos.application.ServiceExtAbility.d.ts
rename to api/@ohos.application.ServiceExtensionAbility.d.ts
index 57a549082fc195e6c9f0ce9c98d039428b4dfdab..d4d06bc4049ed66d3da2a102513a14cb640bc907 100644
--- a/api/@ohos.application.ServiceExtAbility.d.ts
+++ b/api/@ohos.application.ServiceExtensionAbility.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -14,35 +14,35 @@
*/
import rpc from "./@ohos.rpc";
-import ServiceExtAbilityContext from "./application/ServiceExtAbilityContext";
+import ServiceExtensionContext from "./application/ServiceExtensionContext";
import Want from './@ohos.application.Want';
+import { Configuration } from './@ohos.application.Configuration';
/**
* class of service extension ability.
*
* @since 9
- * @sysCap AAFwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi hide for inner use.
* @StageModelOnly
*/
-export default class ServiceExtAbility {
+export default class ServiceExtensionAbility {
/**
* Indicates service extension ability context.
*
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi hide for inner use.
* @StageModelOnly
*/
- context: ServiceExtAbilityContext;
+ context: ServiceExtensionContext;
/**
* Called back when a service extension is started for initialization.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @param want Indicates the want of created service extension.
* @systemapi hide for inner use.
* @return -
* @StageModelOnly
@@ -52,9 +52,8 @@ export default class ServiceExtAbility {
/**
* Called back before a service extension is destroyed.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi hide for inner use.
* @return -
* @StageModelOnly
@@ -64,9 +63,8 @@ export default class ServiceExtAbility {
/**
* Called back when a service extension is started.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param want Indicates the want of service extension to start.
* @param startId Indicates the number of times the service extension has been started. The {@code startId} is
* incremented by 1 every time the service extension is started. For example, if the service extension
@@ -80,9 +78,8 @@ export default class ServiceExtAbility {
/**
* Called back when a service extension is first connected to an ability.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param want Indicates connection information about the Service ability.
* @systemapi hide for inner use.
* @return Returns the proxy of the Service ability.
@@ -93,9 +90,8 @@ export default class ServiceExtAbility {
/**
* Called back when all abilities connected to a service extension are disconnected.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param want Indicates disconnection information about the service extension.
* @systemapi hide for inner use.
* @return -
@@ -107,14 +103,24 @@ export default class ServiceExtAbility {
* Called when a new client attempts to connect to a service extension after all previous client connections to it
* are disconnected.
*
- * @devices phone, tablet, tv, wearable, car
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param want Indicates the want of the service extension being connected.
* @systemapi hide for inner use.
* @return -
* @StageModelOnly
*/
onReconnect(want: Want): void;
+
+ /**
+ * Called when the system configuration is updated.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @param config Indicates the updated configuration.
+ * @return -
+ * @StageModelOnly
+ */
+ onConfigurationUpdated(config: Configuration): void;
}
diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts
index 5c0b9e7d041e9e27f562824297483e010cc21b6e..b4cd41bbceab5748d8c933e5331f968ec393817e 100644
--- a/api/@ohos.application.StartOptions.d.ts
+++ b/api/@ohos.application.StartOptions.d.ts
@@ -18,7 +18,7 @@
*
* @name StartOptions
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @permission N/A
* @StageModelOnly
*/
@@ -27,7 +27,7 @@ export default class StartOptions {
* windowMode
* @default -
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
windowMode?: number;
@@ -35,9 +35,8 @@ export default class StartOptions {
/**
* displayId
* @default -
- * @devices phone, tablet
* @since 9
- * @sysCap AAFwk
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
*/
displayId?: number;
diff --git a/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ebd6484ac6fee62f5cfe1c91699ec6a662c9de96
--- /dev/null
+++ b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License"),
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import CommonEventData from "./commonEvent/commonEventData";
+
+/**
+ * class of static subscriber extension ability.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi hide for inner use.
+ * @StageModelOnly
+ */
+export default class StaticSubscriberExtensionAbility {
+ /**
+ * Called back when a specific common event is published.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi hide for inner use.
+ * @return -
+ * @StageModelOnly
+ */
+ onReceiveEvent(event: CommonEventData): void;
+}
\ No newline at end of file
diff --git a/api/@ohos.application.Want.d.ts b/api/@ohos.application.Want.d.ts
index 337e376ae1577c1a1cedb04d5fed5b48fc7d4f4e..6b2c2b0ae671dc0d0f36a7f79506d7801fa7e39d 100644
--- a/api/@ohos.application.Want.d.ts
+++ b/api/@ohos.application.Want.d.ts
@@ -18,7 +18,7 @@
*
* @name Want
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @permission N/A
*/
export default class Want {
@@ -26,7 +26,7 @@ export default class Want {
* device id
* @default -
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
*/
deviceId?: string;
@@ -34,7 +34,7 @@ export default class Want {
* bundle name
* @default -
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
*/
bundleName?: string;
@@ -42,14 +42,14 @@ export default class Want {
* ability name
* @default -
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
*/
abilityName?: string;
/**
* The description of a URI in a Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
uri?: string;
@@ -57,7 +57,7 @@ export default class Want {
/**
* The description of the type in this Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
type?: string;
@@ -65,7 +65,7 @@ export default class Want {
/**
* The options of the flags in this Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
flags?: number;
@@ -73,7 +73,7 @@ export default class Want {
/**
* The description of an action in an want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
action?: string;
@@ -81,7 +81,7 @@ export default class Want {
/**
* The description of the WantParams object in an Want
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
parameters?: {[key: string]: any};
@@ -89,7 +89,7 @@ export default class Want {
/**
* The description of a entities in a Want.
* @since 8
- * @sysCap SystemCapability.Ability.AbilityBase
+ * @syscap SystemCapability.Ability.AbilityBase
* @default -
*/
entities?: Array;
diff --git a/api/@ohos.application.abilityDelegatorRegistry.d.ts b/api/@ohos.application.abilityDelegatorRegistry.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c21a8cc64ede0a8d5e28226ba6dc2087d3b8ff97
--- /dev/null
+++ b/api/@ohos.application.abilityDelegatorRegistry.d.ts
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AbilityDelegator } from './application/abilityDelegator'
+import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs'
+
+/**
+ * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered
+ * during application startup.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @import import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
+ * @permission N/A
+ */
+declare namespace abilityDelegatorRegistry {
+ /**
+ * Get the AbilityDelegator object of the application.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return the AbilityDelegator object initialized when the application is started.
+ */
+ function getAbilityDelegator(): AbilityDelegator;
+
+ /**
+ * Get unit test parameters stored in the AbilityDelegatorArgs object.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return the previously registered AbilityDelegatorArgs object.
+ */
+ function getArguments(): AbilityDelegatorArgs;
+
+ /**
+ * Describes all lifecycle states of an ability.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ export enum AbilityLifecycleState {
+ UNINITIALIZED,
+ CREATE,
+ FOREGROUND,
+ BACKGROUND,
+ DESTROY,
+ }
+}
+
+export default abilityDelegatorRegistry;
\ No newline at end of file
diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts
index ff2426a5e7bc9e4598d977d2e6bd62e604fb6fba..5221fc08a0d6a920ccbb6bd401a8b2387372b4ad 100644
--- a/api/@ohos.application.abilityManager.d.ts
+++ b/api/@ohos.application.abilityManager.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,7 +22,7 @@ import { ExtensionRunningInfo } from './application/ExtensionRunningInfo';
* The class of an ability manager.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @permission N/A
*/
declare namespace abilityManager {
@@ -30,7 +30,7 @@ declare namespace abilityManager {
/**
* @name AbilityState
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @permission N/A
*/
export enum AbilityState {
@@ -45,10 +45,11 @@ declare namespace abilityManager {
* Updates the configuration by modifying the configuration.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param config Indicates the new configuration.
* @systemapi Hide this for inner system use.
* @return -
+ * @permission ohos.permission.UPDATE_CONFIGURATION
*/
function updateConfiguration(config: Configuration, callback: AsyncCallback): void;
function updateConfiguration(config: Configuration): Promise;
@@ -57,21 +58,23 @@ declare namespace abilityManager {
* Get information about running abilitys
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi Hide this for inner system use.
- * @return -
+ * @return Returns the array of {@link AbilityRunningInfo}.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getAbilityRunningInfos(): Promise>;
function getAbilityRunningInfos(callback: AsyncCallback>): void;
-
+
/**
* Get information about running extensions
*
* @since 9
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param upperLimit Get the maximum limit of the number of messages
* @systemapi Hide this for inner system use.
- * @return -
+ * @return Returns the array of {@link ExtensionRunningInfo}.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getExtensionRunningInfos(upperLimit: number): Promise>;
function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void;
diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts
index dcb6dca86ab862ac726dd65add9cc4c67820639f..eb086aec2838d5ac416242f732b174a7fde2c75e 100644
--- a/api/@ohos.application.appManager.d.ts
+++ b/api/@ohos.application.appManager.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,7 +22,7 @@ import { ProcessRunningInfo } from './application/ProcessRunningInfo';
* This module provides the function of app manager service.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @import import appManager from '@ohos.application.appManager'
* @permission N/A
*/
@@ -32,10 +32,11 @@ declare namespace appManager {
*
* @default -
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param observer The application state observer.
* @systemapi hide this for inner system use
* @return Returns the number code of the observer.
+ * @permission ohos.permission.RUNNING_STATE_OBSERVER
*/
function registerApplicationStateObserver(observer: ApplicationStateObserver): number;
@@ -43,10 +44,11 @@ declare namespace appManager {
* Unregister application state observer.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param observerId Indicates the number code of the observer.
* @systemapi hide this for inner system use
* @return -
+ * @permission ohos.permission.RUNNING_STATE_OBSERVER
*/
function unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback): void;
function unregisterApplicationStateObserver(observerId: number): Promise;
@@ -55,9 +57,10 @@ declare namespace appManager {
* getForegroundApplications.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi hide this for inner system use
* @return Returns the list of AppStateData.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getForegroundApplications(callback: AsyncCallback>): void;
function getForegroundApplications(): Promise>;
@@ -66,11 +69,12 @@ declare namespace appManager {
* Kill process with account.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param bundleName The process bundle name.
* @param accountId The account id.
* @systemapi hide this for inner system use
* @return -
+ * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES
*/
function killProcessWithAccount(bundleName: string, accountId: number): Promise;
function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void;
@@ -79,7 +83,7 @@ declare namespace appManager {
* Is user running in stability test.
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @return Returns true if user is running stability test.
*/
function isRunningInStabilityTest(callback: AsyncCallback): void;
@@ -89,9 +93,10 @@ declare namespace appManager {
* Get information about running processes
*
* @since 8
- * @SysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi Hide this for inner system use.
- * @return -
+ * @return Returns the array of {@link ProcessRunningInfo}.
+ * @permission ohos.permission.GET_RUNNING_INFO
*/
function getProcessRunningInfos(): Promise>;
function getProcessRunningInfos(callback: AsyncCallback>): void;
@@ -99,11 +104,10 @@ declare namespace appManager {
/**
* Kill processes by bundle name
* @since 8
- * @SysCap SystemCapability.Appexecfwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param bundleName bundle name.
- * @permission ohos.permission.DELETE_MISSIONS
* @systemapi hide this for inner system use
+ * @permission ohos.permission.CLEAN_BACKGROUND_PROCESSES
*/
function killProcessesByBundleName(bundleName: string): Promise;
function killProcessesByBundleName(bundleName: string, callback: AsyncCallback);
@@ -111,14 +115,31 @@ declare namespace appManager {
/**
* Clear up application data by bundle name
* @since 8
- * @SysCap SystemCapability.Appexecfwk
- * @devices phone, tablet, tv, wearable, car
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param bundleName bundle name.
- * @permission ohos.permission.DELETE_MISSIONS
* @systemapi hide this for inner system use
+ * @permission ohos.permission.CLEAN_APPLICATION_DATA
*/
function clearUpApplicationData(bundleName: string): Promise;
function clearUpApplicationData(bundleName: string, callback: AsyncCallback);
+
+ /**
+ * Is it a ram-constrained device
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return whether a ram-constrained device.
+ */
+ function isRamConstrainedDevice(): Promise;
+ function isRamConstrainedDevice(callback: AsyncCallback): void;
+
+ /**
+ * Get the memory size of the application
+ * @since 7
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @return application memory size.
+ */
+ function getAppMemorySize(): Promise;
+ function getAppMemorySize(callback: AsyncCallback): void;
}
export default appManager;
diff --git a/api/@ohos.application.formBindingData.d.ts b/api/@ohos.application.formBindingData.d.ts
index ad398765917917ecc7774d2e0ff1cda7225c41e0..6ede7819dcc74a2d77f89944e7461ea3339409e5 100644
--- a/api/@ohos.application.formBindingData.d.ts
+++ b/api/@ohos.application.formBindingData.d.ts
@@ -18,14 +18,14 @@
*
* @name formBindingData
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
*/
declare namespace formBindingData {
/**
* Create an FormBindingData instance.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param obj Indicates the FormBindingData instance data.
* @return Returns the {@link FormBindingData} instance.
*/
diff --git a/api/@ohos.application.missionManager.d.ts b/api/@ohos.application.missionManager.d.ts
index 94f172f8e5fc096eaf834b759b95bc4de2195a7c..dc6a871c31938cc604ca2c107fa0cf98cf7731fd 100644
--- a/api/@ohos.application.missionManager.d.ts
+++ b/api/@ohos.application.missionManager.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Huawei Device Co., Ltd.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -24,8 +24,8 @@ import StartOptions from "./@ohos.application.StartOptions";
*
* @name missionManager
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
- * @permission N/A
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @permission ohos.permission.MANAGE_MISSIONS
* @systemapi hide for inner use.
*/
declare namespace missionManager {
@@ -33,7 +33,8 @@ declare namespace missionManager {
* Register the missionListener to ams.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param listener Indicates the MissionListener to be registered.
* @return The index number of the MissionListener.
*/
function registerMissionListener(listener: MissionListener): number;
@@ -42,7 +43,8 @@ declare namespace missionManager {
* Unrgister the missionListener to ams.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param listenerId Indicates the listener id to be unregistered.
* @return -
*/
function unregisterMissionListener(listenerId: number, callback: AsyncCallback): void;
@@ -52,7 +54,9 @@ declare namespace missionManager {
* Get the missionInfo with the given missionId.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param deviceId Indicates the device to be queried.
+ * @param missionId Indicates mission id to be queried.
* @return the {@link MissionInfo} of the given id.
*/
function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void;
@@ -62,7 +66,9 @@ declare namespace missionManager {
* Get the missionInfo with the given missionId.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param deviceId Indicates the device to be queried.
+ * @param numMax Indicates the maximum number of returned missions.
* @return The array of the {@link MissionInfo}.
*/
function getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback>): void;
@@ -72,7 +78,9 @@ declare namespace missionManager {
* Get the mission snapshot with the given missionId.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param deviceId Indicates the device to be queried.
+ * @param missionId Indicates mission id to be queried.
* @return The {@link MissionSnapshot} of the given id.
*/
function getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void;
@@ -82,7 +90,8 @@ declare namespace missionManager {
* Lock the mission.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be locked.
* @return -
*/
function lockMission(missionId: number, callback: AsyncCallback): void;
@@ -92,7 +101,8 @@ declare namespace missionManager {
* Unlock the mission.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be unlocked.
* @return -
*/
function unlockMission(missionId: number, callback: AsyncCallback): void;
@@ -102,7 +112,8 @@ declare namespace missionManager {
* Clear the given mission in the ability manager service.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be cleared.
* @return -
*/
function clearMission(missionId: number, callback: AsyncCallback): void;
@@ -112,7 +123,7 @@ declare namespace missionManager {
* Clear all missions in the ability manager service.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @return -
*/
function clearAllMissions(callback: AsyncCallback): void;
@@ -122,7 +133,9 @@ declare namespace missionManager {
* Schedule the given mission to foreground.
*
* @since 8
- * @sysCap SystemCapability.Ability.AbilityRuntime.Mission
+ * @syscap SystemCapability.Ability.AbilityRuntime.Mission
+ * @param missionId Indicates mission id to be moved to foreground.
+ * @param options Indicates the start options.
* @return -
*/
function moveMissionToFront(missionId: number, callback: AsyncCallback): void;
diff --git a/api/ability/continueAbilityOptions.d.ts b/api/@ohos.application.testRunner.d.ts
old mode 100755
new mode 100644
similarity index 47%
rename from api/ability/continueAbilityOptions.d.ts
rename to api/@ohos.application.testRunner.d.ts
index 32c09d141425de7df7c76477511658ea6505d8c6..58593017d019b48e98981fd1e5218d61cc7e77c8
--- a/api/ability/continueAbilityOptions.d.ts
+++ b/api/@ohos.application.testRunner.d.ts
@@ -13,30 +13,31 @@
* limitations under the License.
*/
- /**
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+/**
+ * Base class for the test framework.
+ * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @import import TestRunner from '@ohos.application.testRunner'
* @permission N/A
*/
-export interface ContinueAbilityOptions {
- /**
- * Indicates the ID of the target device where this ability will be migrated to.
- *
- * @default -
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @FAModelOnly
- */
- deviceId: string;
+export interface TestRunner {
+ /**
+ * Prepare the unit testing environment for running test cases.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ onPrepare(): void;
+
+ /**
+ * Run all test cases.
+ *
+ * @since 9
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ */
+ onRun(): void;
+}
- /**
- * Indicates whether the ability to be migrated back to the local device through
- * This is a reserved field.
- *
- * @default -
- * @since 7
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
- * @FAModelOnly
- */
- reversible?: boolean;
-}
\ No newline at end of file
+export default TestRunner;
\ No newline at end of file
diff --git a/api/@ohos.application.UriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts
similarity index 72%
rename from api/@ohos.application.UriPermissionManager.d.ts
rename to api/@ohos.application.uriPermissionManager.d.ts
index f79c74100803bf19b1987cf5a266b915bff2f50b..37cd85441c8e8f9653759a09967c58e6a360c5be 100644
--- a/api/@ohos.application.UriPermissionManager.d.ts
+++ b/api/@ohos.application.uriPermissionManager.d.ts
@@ -20,20 +20,22 @@ import wantConstant from "./@ohos.ability.wantConstant";
* The management class for uri of file.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @permission N/A
*/
-export default class UriPermissionManager {
+declare namespace uriPermissionManager {
/**
* Check whether the application corresponding to the accesstokenID has access rights to the URI.
*
* @since 9
- * @sysCap SystemCapability.Ability.AbilityRuntime.Core
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
* @param uri File URI.
* @param flag wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION or wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION
* @param accessTokenId Indicates the access token of the application.
* @return Returns 0 if the verification is successful, otherwise returns -1.
*/
- verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number, callback: AsyncCallback): void;
- verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number): Promise;
+ function verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number, callback: AsyncCallback): void;
+ function verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number): Promise;
}
+
+export default uriPermissionManager;
\ No newline at end of file
diff --git a/api/@ohos.batteryinfo.d.ts b/api/@ohos.batteryinfo.d.ts
index a139929f6d85cb3fb8640a99e1fc7d45eabf1762..265f6c4df200eb99e4a13ab50a62bed94d4f0e87 100644
--- a/api/@ohos.batteryinfo.d.ts
+++ b/api/@ohos.batteryinfo.d.ts
@@ -19,7 +19,7 @@
*
Battery information includes the remaining battery power,
* voltage, temperature, model, and charger type.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManage.Core
* @since 6
*/
declare namespace batteryInfo {
@@ -74,7 +74,7 @@ declare namespace batteryInfo {
/**
* Indicates the charger type of a device.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManage.Core
* @since 6
*/
export enum BatteryPluggedType {
@@ -103,7 +103,7 @@ declare namespace batteryInfo {
/**
* Indicates the battery charging status of a device.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManage.Core
* @since 6
*/
export enum BatteryChargeState {
@@ -132,7 +132,7 @@ declare namespace batteryInfo {
/**
* Indicates the battery health status of a device.
*
- * @sysCap SystemCapability.PowerManager.BatteryManage.Core
+ * @syscap SystemCapability.PowerManager.BatteryManage.Core
* @since 6
*/
export enum BatteryHealthState {
diff --git a/api/@ohos.bluetooth.d.ts b/api/@ohos.bluetooth.d.ts
index 155520f1577dba21ce71d391fa7fe83da1f8805c..b3dde1d0f94f8727c4ddc8530bf3bf44bc8dfdf8 100644
--- a/api/@ohos.bluetooth.d.ts
+++ b/api/@ohos.bluetooth.d.ts
@@ -121,6 +121,16 @@ declare namespace bluetooth {
*/
function getPairedDevices(): Array;
+ /**
+ * Obtains the connection state of profile.
+ *
+ * @param profileId The profile id.
+ * @return Returns the connection state.
+ * @since 8
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
+ function getProfileConnState(profileId: ProfileId): ProfileConnectionState;
+
/**
* Sets the confirmation of pairing with a certain device.
*
@@ -336,6 +346,202 @@ declare namespace bluetooth {
*/
function off(type: "sppRead", clientSocket: number, callback?: Callback): void;
+ /**
+ * Obtains the instance of profile.
+ *
+ * @param profileId The profile id..
+ * @return Returns instance of profile.
+ * @since 8
+ */
+ function getProfile(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile;
+
+ /**
+ * Base interface of profile.
+ */
+ interface BaseProfile {
+ /**
+ * Obtains the connected devices list of profile.
+ *
+ * @return Returns the address of connected devices list.
+ * @since 8
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
+ getConnectionDevices(): Array;
+
+ /**
+ * Obtains the profile state of device.
+ *
+ * @param device The address of bluetooth device.
+ * @return Returns {@link ProfileConnectionState} of device.
+ * @since 8
+ * @permission ohos.permission.USE_BLUETOOTH
+ */
+ getDeviceState(device: string): ProfileConnectionState;
+ }
+
+ /**
+ * Manager a2dp source profile.
+ */
+ interface A2dpSourceProfile extends BaseProfile {
+ /**
+ * Connect to device with a2dp.
+ *
+ * @param device The address of the remote device to connect.
+ * @return Returns {@code true} if the connect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ connect(device: string): boolean;
+
+ /**
+ * Disconnect to device with a2dp.
+ *
+ * @param device The address of the remote device to disconnect.
+ * @return Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ disconnect(device: string): boolean;
+
+ /**
+ * Subscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ on(type: "connectionStateChange", callback: Callback): void;
+
+ /**
+ * Unsubscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ off(type: "connectionStateChange", callback?: Callback): void;
+
+ /**
+ * Obtains the playing state of device.
+ *
+ * @param device The address of the remote device.
+ * @return Returns {@link PlayingState} of the remote device.
+ *
+ */
+ getPlayingState(device: string): PlayingState;
+ }
+
+ /**
+ * Manager handsfree AG profile.
+ */
+ interface HandsFreeAudioGatewayProfile extends BaseProfile {
+ /**
+ * Connect to device with hfp.
+ *
+ * @param device The address of the remote device to connect.
+ * @return Returns {@code true} if the connect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ connect(device: string): boolean;
+
+ /**
+ * Disconnect to device with hfp.
+ *
+ * @param device The address of the remote device to disconnect.
+ * @return Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ disconnect(device: string): boolean;
+
+ /**
+ * Obtains the sco state of device.
+ *
+ * @param device The address of the remote device.
+ * @return Returns {@code true} if the disconnect is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.USE_BLUETOOTH
+ */
+ getScoState(device: string): number;
+
+ /**
+ * Create audio channel.
+ *
+ * @param device The address of the remote device.
+ * @return Returns {@code true} if the request is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ connectSco(device: string): boolean;
+
+ /**
+ * Close audio channel.
+ *
+ * @param device The address of the remote device.
+ * @return Returns {@code true} if the request is in process; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ disconnectSco(device: string): boolean;
+
+ /**
+ * Subscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ on(type: "connectionStateChange", callback: Callback): void;
+
+ /**
+ * Unsubscribe the event reported when the profile connection state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ off(type: "connectionStateChange", callback?: Callback): void;
+
+ /**
+ * Subscribe the event reported when the sco state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ on(type: "scoStateChange", callback: Callback): void;
+
+ /**
+ * Unsubscribe the event reported when the sco state changes .
+ *
+ * @param type Type of the profile connection state changes event to listen for .
+ * @param callback Callback used to listen for event.
+ * @since 8
+ */
+ off(type: "scoStateChange", callback?: Callback): void;
+
+ /**
+ * Open voice recognition function.
+ *
+ * @param device The address of the remote device to disconnect.
+ * @return Returns {@code true} if success; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ openVoiceRecognition(device: string): boolean;
+
+ /**
+ * Close voice recognition function.
+ *
+ * @param device The address of the remote device to disconnect.
+ * @return Returns {@code true} if success; returns {@code false} otherwise.
+ * @since 8
+ * @permission permission ohos.permission.DISCOVER_BLUETOOTH
+ */
+ closeVoiceRecognition(device: string): boolean;
+ }
+
namespace BLE {
/**
* create a JavaScript Gatt server instance.
@@ -1306,6 +1512,64 @@ declare namespace bluetooth {
HEALTH_GENERIC_HEALTH_MANAGER = 0x0938,
HEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C,
}
+
+ /**
+ * Profile state change parameters.
+ *
+ * @since 8
+ */
+ interface StateChangeParam {
+ /** The address of device */
+ deviceId: string;
+
+ /** Profile state value */
+ state: ProfileConnectionState;
+ }
+
+ /**
+ * Sco state change parameters.
+ *
+ * @since 8
+ */
+ Interface ScoStateParam {
+ /** The address of device */
+ deviceId: string,
+
+ /** Sco state value */
+ state: ScoState
+ }
+
+ /**
+ * The enum of a2dp playing state.
+ *
+ * @since 8
+ */
+ enum PlayingState {
+ STATE_NOT_PLAYING,
+ STATE_PLAYING,
+ }
+
+ /**
+ * The enum of sco audio state.
+ *
+ * @since 8
+ */
+ enum ScoState {
+ SCO_DISCONNECTED,
+ SCO_CONNECTING,
+ SCO_DISCONNECTING,
+ SCO_CONNECTED
+ }
+
+ /**
+ * The enum of profile id.
+ *
+ * @since 8
+ */
+ enum ProfileId {
+ PROFILE_A2DP_SOURCE = 1,
+ PROFILE_HANDS_FREE_AUDIO_GATEWAY = 4,
+ }
}
export default bluetooth;
diff --git a/api/@ohos.brightness.d.ts b/api/@ohos.brightness.d.ts
index f12bc7a706745b47aa73eda3fb6a1c0ad3745153..bb8b0988049e37d66b524897ad8c45d672ee5326 100644
--- a/api/@ohos.brightness.d.ts
+++ b/api/@ohos.brightness.d.ts
@@ -18,7 +18,7 @@ import { AsyncCallback } from './basic';
/**
* Provides interfaces to control the power of display.
*
- * @sysCap SystemCapability.PowerManager.DisplayPowerManager
+ * @syscap SystemCapability.PowerManager.DisplayPowerManager
* @since 7
*/
declare namespace brightness {
@@ -26,7 +26,6 @@ declare namespace brightness {
* Sets the screen brightness.
*
* @param value Brightness value, ranging from 0 to 255.
- * @sysCap SystemCapability.PowerManager.DisplayPowerManager
* @systemapi
* @since 7
*/
diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts
index 8d2be229f4907e7bfdafb13592a25f9d9f47a9b2..efe17b4b64240357af10d9f8d189a60dea3bbdfe 100644
--- a/api/@ohos.bundle.d.ts
+++ b/api/@ohos.bundle.d.ts
@@ -20,9 +20,9 @@ import { AbilityInfo } from './bundle/abilityInfo';
import { ExtensionAbilityInfo } from './bundle/extensionAbilityInfo';
import { Want } from './ability/want';
import { BundleInstaller } from './bundle/bundleInstaller';
-import { ShortcutInfo } from './bundle/shortcutInfo';
import { ModuleUsageRecord } from './bundle/moduleUsageRecord';
import { PermissionDef } from './bundle/PermissionDef';
+import image from './@ohos.multimedia.image';
/**
* bundle.
@@ -384,6 +384,19 @@ declare namespace bundle {
*/
function getBundleInstaller(callback: AsyncCallback): void;
function getBundleInstaller(): Promise;
+
+ /**
+ * Obtains information about the current ability.
+ *
+ * @since 7
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the application bundle name to be queried.
+ * @param abilityName Indicates the ability name.
+ * @return Returns the AbilityInfo object for the current ability.
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO
+ */
+ function getAbilityInfo(bundleName: string, abilityName: string, callback: AsyncCallback): void;
+ function getAbilityInfo(bundleName: string, abilityName: string): Promise;
/**
* Obtains based on a given bundle name.
@@ -393,12 +406,13 @@ declare namespace bundle {
* @param bundleName Indicates the application bundle name to be queried.
* @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo object
* that will be returned.
- * @param userId Indicates the user ID.
+ * @param userId Indicates the user ID or do not pass user ID.
* @return Returns the ApplicationInfo object.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.GET_BUNDLE_INFO
*/
function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number, callback: AsyncCallback) : void;
- function getApplicationInfo(bundleName: string, bundleFlags: number, userId: number) : Promise;
+ function getApplicationInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback) : void;
+ function getApplicationInfo(bundleName: string, bundleFlags: number, userId?: number) : Promise;
/**
* Query the AbilityInfo by the given Want.
@@ -439,12 +453,13 @@ declare namespace bundle {
* @syscap SystemCapability.BundleManager.BundleFramework
* @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo objects
* that will be returned.
- * @param userId Indicates the user ID.
+ * @param userId Indicates the user ID or do not pass user ID.
* @return Returns a list of ApplicationInfo objects.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
*/
function getAllApplicationInfo(bundleFlags: number, userId: number, callback: AsyncCallback>) : void;
- function getAllApplicationInfo(bundleFlags: number, userId: number) : Promise>;
+ function getAllApplicationInfo(bundleFlags: number, callback: AsyncCallback>) : void;
+ function getAllApplicationInfo(bundleFlags: number, userId?: number) : Promise>;
/**
* Obtains bundle name by the given uid.
@@ -467,12 +482,11 @@ declare namespace bundle {
* @param bundleFlags Indicates the flag used to specify information contained in the BundleInfo object to be
* returned.
* @return Returns the BundleInfo object.
+ * @systemapi Hide this for inner system use
*/
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback) : void
function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number) : Promise;
- /**
-
/**
* Obtains the Want for starting the main ability of an application based on the
* given bundle name. The main ability of an application is the ability that has the
@@ -489,18 +503,6 @@ declare namespace bundle {
function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback): void;
function getLaunchWantForBundle(bundleName: string): Promise;
- /**
- * Obtains information about the shortcuts of the application.
- *
- * @since 7
- * @syscap SystemCapability.BundleManager.BundleFramework
- * @param bundleName Indicates the bundle name of the application.
- * @return Returns a list of ShortcutInfo objects containing shortcut information about the application.
- * @permission ohos.permission.MANAGE_SHORTCUTS
- */
- function getAllShortcutInfo(bundleName: string, callback: AsyncCallback>): void;
- function getAllShortcutInfo(bundleName: string): Promise>;
-
/**
* get module usage record list in descending order of lastLaunchTime.
*
@@ -582,6 +584,54 @@ declare namespace bundle {
*/
function getPermissionDef(permissionName: string, callback: AsyncCallback): void;
function getPermissionDef(permissionName: string): Promise;
+
+ /**
+ * Obtains the label of a specified ability.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the bundle name of the application to which the ability belongs.
+ * @param abilityName Indicates the ability name.
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+ * @return Returns the label representing the label of the specified ability.
+ */
+ function getAbilityLabel(bundleName: string, abilityName: string, callback: AsyncCallback): void;
+ function getAbilityLabel(bundleName: string, abilityName: string): Promise;
+
+ /**
+ * Obtains the icon of a specified ability.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the bundle name of the application to which the ability belongs.
+ * @param abilityName Indicates the ability name.
+ * @return Returns the PixelMap object representing the icon of the specified ability.
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+ */
+ function getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback): void;
+ function getAbilityIcon(bundleName: string, abilityName: string): Promise;
+
+ /**
+ * Checks whether a specified ability is enabled.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param info Indicates information about the ability to check.
+ * @returns Returns true if the ability is enabled; returns false otherwise.
+ */
+ function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback): void;
+ function isAbilityEnabled(info: AbilityInfo): Promise;
+
+ /**
+ * Checks whether a specified application is enabled.
+ *
+ * @since 8
+ * @syscap SystemCapability.BundleManager.BundleFramework
+ * @param bundleName Indicates the bundle name of the application.
+ * @returns Returns true if the application is enabled; returns false otherwise.
+ */
+ function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void;
+ function isApplicationEnabled(bundleName: string): Promise;
}
export default bundle;
diff --git a/api/@ohos.bundleState.d.ts b/api/@ohos.bundleState.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..eb724fd056044215e00f8d7b64e79b1b2906762e
--- /dev/null
+++ b/api/@ohos.bundleState.d.ts
@@ -0,0 +1,265 @@
+/*
+ * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AsyncCallback } from './basic';
+
+/**
+ * Provides methods for managing bundle usage statistics,
+ * including the methods for querying bundle usage information and state data.
+ *
+ *
You can use the methods defined in this class to query
+ * the usage history and states of bundles in a specified period.
+ * The system stores the query result in a {@link BundleStateInfo} or {@link BundleActiveState} instance and
+ * then returns it to you.
+ *
+ * @since 7
+ */
+declare namespace bundleState {
+
+ /**
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ */
+ interface BundleStateInfo {
+ /**
+ * the identifier of BundleStateInfo.
+ */
+ id: number;
+ /**
+ * the total duration, in milliseconds.
+ */
+ abilityInFgTotalTime?: number;
+ /**
+ * the last time when the application was accessed, in milliseconds.
+ */
+ abilityPrevAccessTime?: number;
+ /**
+ * the last time when the application was visible in the foreground, in milliseconds.
+ */
+ abilityPrevSeenTime?: number;
+ /**
+ * the total duration, in milliseconds.
+ */
+ abilitySeenTotalTime?: number;
+ /**
+ * the bundle name of the application.
+ */
+ bundleName?: string;
+ /**
+ * the total duration, in milliseconds.
+ */
+ fgAbilityAccessTotalTime?: number;
+ /**
+ * the last time when the foreground application was accessed, in milliseconds.
+ */
+ fgAbilityPrevAccessTime?: number;
+ /**
+ * the time of the first bundle usage record in this {@code BundleActiveInfo} object,
+ * in milliseconds.
+ */
+ infosBeginTime?: number;
+ /**
+ * the time of the last bundle usage record in this {@code BundleActiveInfo} object,
+ * in milliseconds.
+ */
+ infosEndTime?: number;
+
+ /**
+ * Merges a specified {@link BundleActiveInfo} object with this {@link BundleActiveInfo} object.
+ * The bundle name of both objects must be the same.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @param toMerge Indicates the {@link BundleActiveInfo} object to merge.
+ * if the bundle names of the two {@link BundleActiveInfo} objects are different.
+ */
+ merge(toMerge: BundleStateInfo): void;
+ }
+
+ /**
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ */
+ interface BundleActiveState {
+ /**
+ * the usage priority group of the application.
+ */
+ appUsagePriorityGroup?: number;
+ /**
+ * the bundle name.
+ */
+ bundleName?: string;
+ /**
+ * the shortcut ID.
+ */
+ indexOfLink?: string;
+ /**
+ * the class name.
+ */
+ nameOfClass?: string;
+ /**
+ * the time when this state occurred, in milliseconds.
+ */
+ stateOccurredTime?: number;
+ /**
+ * the state type.
+ */
+ stateType?: number;
+ }
+
+ /**
+ * Checks whether the application with a specified bundle name is in the idle state.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @param bundleName Indicates the bundle name of the application to query.
+ * @return Returns {@code true} if the application is idle in a particular period;
+ * returns {@code false} otherwise. The time range of the particular period is defined by the system,
+ * which may be hours or days.
+ */
+ function isIdleState(bundleName: string, callback: AsyncCallback): void;
+ function isIdleState(bundleName: string): Promise;
+
+ /**
+ * Queries the usage priority group of the calling application.
+ *
+ *
The priority defined in a priority group restricts the resource usage of an application,
+ * for example, restricting the running of background tasks.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @return Returns the usage priority group of the calling application.
+ */
+ function queryAppUsagePriorityGroup(callback: AsyncCallback): void;
+ function queryAppUsagePriorityGroup(): Promise;
+
+ /**
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ */
+ interface BundleActiveInfoResponse {
+ [key: string]: BundleStateInfo;
+ }
+
+ /**
+ * Queries usage information about each bundle within a specified period.
+ *
+ *
This method queries usage information at the {@link #BY_OPTIMIZED} interval by default.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the {@link BundleActiveInfoResponse} objects containing the usage information about each bundle.
+ */
+ function queryBundleStateInfos(begin: number, end: number, callback: AsyncCallback): void;
+ function queryBundleStateInfos(begin: number, end: number): Promise;
+
+ /**
+ * Declares interval type.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ */
+ export enum IntervalType {
+ /**
+ * Indicates the interval type that will determine the optimal interval based on the start and end time.
+ */
+ BY_OPTIMIZED = 0,
+
+ /**
+ * Indicates the daily interval.
+ */
+ BY_DAILY = 1,
+
+ /**
+ * Indicates the weekly interval.
+ */
+ BY_WEEKLY = 2,
+
+ /**
+ * Indicates the monthly interval.
+ */
+ BY_MONTHLY = 3,
+
+ /**
+ * Indicates the annually interval.
+ */
+ BY_ANNUALLY = 4
+ }
+
+ /**
+ * Queries usage information about each bundle within a specified period at a specified interval.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @param byInterval Indicates the interval at which the usage statistics are queried.
+ * The value can be {@link #BY_OPTIMIZED}, {@link #BY_DAILY},
+ * {@link #BY_WEEKLY}, {@link #BY_MONTHLY}, or {@link #BY_ANNUALLY}.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the list of {@link BundleStateInfo} objects containing the usage information about each bundle.
+ */
+ function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number, callback: AsyncCallback>): void;
+ function queryBundleStateInfoByInterval(byInterval: IntervalType, begin: number, end: number): Promise>;
+
+ /**
+ * Queries state data of all bundles within a specified period identified by the start and end time.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the list of {@link BundleActiveState} objects containing the state data of all bundles.
+ */
+ function queryBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void;
+ function queryBundleActiveStates(begin: number, end: number): Promise>;
+
+ /**
+ * Queries state data of the current bundle within a specified period.
+ *
+ * @since 7
+ * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App.
+ * @permission ohos.permission.BUNDLE_ACTIVE_INFO.
+ * @systemapi Hide this for inner system use.
+ * @param begin Indicates the start time of the query period, in milliseconds.
+ * @param end Indicates the end time of the query period, in milliseconds.
+ * @return Returns the {@link BundleActiveState} object Array containing the state data of the current bundle.
+ */
+ function queryCurrentBundleActiveStates(begin: number, end: number, callback: AsyncCallback>): void;
+ function queryCurrentBundleActiveStates(begin: number, end: number): Promise>;
+}
+
+export default bundleState;
\ No newline at end of file
diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts
index e9b04424dc98e1dddef6814796df654253435606..f6a59b218ee165e505f7d5d10e5377df6ffa9614 100644
--- a/api/@ohos.commonEvent.d.ts
+++ b/api/@ohos.commonEvent.d.ts
@@ -170,6 +170,12 @@ declare namespace commonEvent {
*/
COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON",
+ /**
+ * this commonEvent means when the thermal state level change
+ * @since 8
+ */
+ COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED",
+
/**
* this commonEvent means when the user is present after the device waked up.
*/
@@ -890,35 +896,35 @@ declare namespace commonEvent {
/**
* The external storage was removed.
* This is a protected common event that can only be sent by system.
- * @since 8
+ * @since 9
*/
COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED",
/**
* The external storage was unmounted.
* This is a protected common event that can only be sent by system.
- * @since 8
+ * @since 9
*/
COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED",
/**
* The external storage was mounted.
* This is a protected common event that can only be sent by system.
- * @since 8
+ * @since 9
*/
COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED",
/**
* The external storage was bad removal.
* This is a protected common event that can only be sent by system.
- * @since 8
+ * @since 9
*/
COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL",
/**
* The external storage was eject.
* This is a protected common event that can only be sent by system.
- * @since 8
+ * @since 9
*/
COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT",
diff --git a/api/@ohos.configPolicy.d.ts b/api/@ohos.configPolicy.d.ts
index 32ef672ca08824e798623f0eccb68857b4f4b5f3..d12690c30faca84069c5fedcbef457ed789f20f1 100644
--- a/api/@ohos.configPolicy.d.ts
+++ b/api/@ohos.configPolicy.d.ts
@@ -19,7 +19,7 @@ import {AsyncCallback} from "./basic";
* Provides file path related APIS.
*
* @since 8
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
*/
declare namespace configPolicy {
/**
@@ -27,7 +27,7 @@ declare namespace configPolicy {
*
* @since 8
* @systemapi Hide this for inner system use.
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
* @param relPath the relative path of the config file.
* @return Returns the path of the highest priority config file.
*/
@@ -39,7 +39,7 @@ declare namespace configPolicy {
*
* @since 8
* @systemapi Hide this for inner system use.
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
* @param relPath the relative path of the config file.
* @return Returns paths of config files.
*/
@@ -51,7 +51,7 @@ declare namespace configPolicy {
*
* @since 8
* @systemapi Hide this for inner system use.
- * @sysCap SystemCapability.Customization.ConfigPolicy
+ * @syscap SystemCapability.Customization.ConfigPolicy
* @return Returns paths of config directories.
*/
function getCfgDirList(callback: AsyncCallback>);
diff --git a/api/ohos.contact.d.ts b/api/@ohos.contact.d.ts
similarity index 100%
rename from api/ohos.contact.d.ts
rename to api/@ohos.contact.d.ts
diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts
index 1ffd9819ad5008827d0a5ed60c7d78f796165608..e3a377d6cea5acb289960fa17e9223cf55a1d2f8 100644
--- a/api/@ohos.curves.d.ts
+++ b/api/@ohos.curves.d.ts
@@ -16,13 +16,12 @@
/**
* Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves.
* @import import Curves from '@ohos.curves'
- * @devices phone, tablet, tv, wearable
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
declare namespace curves {
/**
* enum Curve.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
enum Curve {
@@ -43,28 +42,24 @@ declare namespace curves {
/**
* Initializes the interpolator curve when called.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
function init(curve?: Curve): string;
/**
* Constructs a step curve when called.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
function steps(count: number, end: boolean): string;
/**
* Constructs a third-order Bezier curve when called.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
function cubicBezier(x1: number, y1: number, x2: number, y2: number): string;
/**
* Constructs a spring curve when called.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
function spring(velocity: number, mass: number, stiffness: number, damping: number): string;
diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..000599ed5d287eb42bd8ea5e9894562ac7905021
--- /dev/null
+++ b/api/@ohos.data.preferences.d.ts
@@ -0,0 +1,199 @@
+/*
+* Copyright (c) 2022 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+import { AsyncCallback, Callback } from './basic';
+import Context from "./application/Context";
+
+/**
+ * Provides interfaces to obtain and modify preferences data.
+ *
+ * @name preferences
+ * @since 9
+ * @syscap SystemCapability.DistributedDataManager.Preferences.Core
+ *
+ */
+declare namespace preferences {
+ /**
+ * Obtains a {@link Preferences} instance matching a specified preferences file name.
+ *
+ *
The {@link references} instance loads all data of the preferences file and
+ * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory.
+ *
+ * @param context Indicates the context of application or capability.
+ * @param name Indicates the preferences file name.
+ * @return Returns the {@link Preferences} instance matching the specified preferences file name.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ function getPreferences(context: Context, name: string, callback: AsyncCallback): void;
+ function getPreferences(context: Context, name: string): Promise;
+
+ /**
+ * Deletes a {@link Preferences} instance matching a specified preferences file name
+ * from the cache which is performed by removePreferencesFromCache and deletes the
+ * preferences file.
+ *
+ *
When deleting the {@link Preferences} instance, you must release all references
+ * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency
+ * will occur.
+ *
+ * @param context Indicates the context of application or capability.
+ * @param name Indicates the preferences file name.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ function deletePreferences(context: Context, name: string, callback: AsyncCallback): void;
+ function deletePreferences(context: Context, name: string): Promise;
+
+ /**
+ * Deletes a {@link Preferences} instance matching a specified preferences file name
+ * from the cache.
+ *
+ *
When deleting the {@link Preferences} instance, you must release all references
+ * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency
+ * will occur.
+ *
+ * @param context Indicates the context of application or capability.
+ * @param name Indicates the preferences file name.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback): void;
+ function removePreferencesFromCache(context: Context, name: string): Promise;
+
+ /**
+ * Provides interfaces to obtain and modify preferences data.
+ *
+ *
The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory.
+ * You can use getPreferences to obtain the {@link Preferences} instance matching
+ * the file that stores preferences data, and use emovePreferencesFromCache
+ * to remove the {@link Preferences} instance from the memory.
+ *
+ * @syscap SystemCapability.DistributedDataManager.Preferences.Core
+ *
+ * @since 9
+ */
+ interface Preferences {
+ /**
+ * Obtains the value of a preferences in the int format.
+ *
+ *
If the value is {@code null} or not in the int format, the default value is returned.
+ *
+ * @param key Indicates the key of the preferences. It cannot be {@code null} or empty.
+ * @param defValue Indicates the default value to return.
+ * @return Returns the value matching the specified key if it is found; returns the default value otherwise.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ get(key: string, defValue: ValueType, callback: AsyncCallback): void;
+ get(key: string, defValue: ValueType): Promise;
+
+ /**
+ * Checks whether the {@link Preferences} object contains a preferences matching a specified key.
+ *
+ * @param key Indicates the key of the preferences to check for.
+ * @return Returns {@code true} if the {@link Preferences} object contains a preferences with the specified key;
+ * returns {@code false} otherwise.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ has(key: string, callback: AsyncCallback): boolean;
+ has(key: string): Promise;
+
+ /**
+ * Sets an int value for the key in the {@link Preferences} object.
+ *
+ *
You can call the {@link #flush} method to save the {@link Preferences} object to the
+ * file.
+ *
+ * @param key Indicates the key of the preferences to modify. It cannot be {@code null} or empty.
+ * @param value Indicates the value of the preferences.
+ * MAX_KEY_LENGTH.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ put(key: string, value: ValueType, callback: AsyncCallback): void;
+ put(key: string, value: ValueType): Promise;
+
+ /**
+ * Deletes the preferences with a specified key from the {@link Preferences} object.
+ *
+ *
You can call the {@link #flush} method to save the {@link Preferences} object to the
+ * file.
+ *
+ * @param key Indicates the key of the preferences to delete. It cannot be {@code null} or empty.
+ * MAX_KEY_LENGTH.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ delete(key: string, callback: AsyncCallback): void;
+ delete(key: string): Promise;
+
+ /**
+ * Clears all preferences from the {@link Preferences} object.
+ *
+ *
You can call the {@link #flush} method to save the {@link Preferences} object to the
+ * file.
+ *
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ clear(callback: AsyncCallback): void;
+ clear(): Promise;
+
+ /**
+ * Asynchronously saves the {@link Preferences} object to the file.
+ *
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ flush(callback: AsyncCallback): void;
+ flush(): Promise;
+
+ /**
+ * Registers an observer to listen for the change of a {@link Preferences} object.
+ *
+ * @param callback Indicates the callback when preferences changes.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ on(type: 'change', callback: Callback<{ key: string }>): void;
+
+ /**
+ * Unregisters an existing observer.
+ *
+ * @param callback Indicates the registered callback.
+ * @throws BusinessError if invoked failed
+ * @since 9
+ */
+ off(type: 'change', callback: Callback<{ key: string }>): void;
+ }
+
+ /**
+ * Indicates possible value types
+ */
+ type ValueType = number | string | boolean;
+
+ /**
+ * Indicates the maximum length of a key (80 characters).
+ */
+ const MAX_KEY_LENGTH: 80;
+
+ /**
+ * Indicates the maximum length of a string (8192 characters).
+ */
+ const MAX_VALUE_LENGTH: 8192;
+}
+
+export default preferences;
diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts
index 4ddeecdf177a887cb10cf35f5aa131096f819ea4..e2317b1d94dc98aa1d913bd02426d9f652662a84 100644
--- a/api/@ohos.data.rdb.d.ts
+++ b/api/@ohos.data.rdb.d.ts
@@ -32,7 +32,7 @@ declare namespace rdb {
* to obtain a rdb store.
*
* @note N/A
- * @since 8
+ * @since 7
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @param context Indicates the context of application or capability.
* @param config Indicates the configuration of the database related to this RDB store. The configurations include
@@ -47,7 +47,7 @@ declare namespace rdb {
* Deletes the database with a specified name.
*
* @note N/A
- * @since 8
+ * @since 7
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @param context Indicates the context of application or capability.
* @param name Indicates the database name.
@@ -240,7 +240,7 @@ declare namespace rdb {
* @param device Indicates the remote device.
* @param table Indicates the local table name.
* @return the distributed table name.
-
+
*/
obtainDistributedTableName(device: string, table: string, callback: AsyncCallback): void;
obtainDistributedTableName(device: string, table: string): Promise;
@@ -254,7 +254,7 @@ declare namespace rdb {
* @param mode Indicates the synchronization mode. The value can be PUSH, PULL.
* @param predicates Constraint synchronized data and devices.
* @param callback Indicates the callback used to send the synchronization result to the caller.
-
+
*/
sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void;
sync(mode: SyncMode, predicates: RdbPredicates): Promise>;
diff --git a/api/@ohos.data.storage.d.ts b/api/@ohos.data.storage.d.ts
index 10190d3808fe2cdc1d4ab1e511c6181f537527a5..e0d4107e06d10319817f9d4e264863eb28240f50 100644
--- a/api/@ohos.data.storage.d.ts
+++ b/api/@ohos.data.storage.d.ts
@@ -18,9 +18,10 @@ import { AsyncCallback, Callback } from './basic';
* Provides interfaces to obtain and modify storage data.
*
* @name storage
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
* @syscap SystemCapability.DistributedDataManager.Preferences.Core
- *
+ *
*/
declare namespace storage {
/**
@@ -32,8 +33,10 @@ declare namespace storage {
* @param path Indicates the path of storage file stored.
* @return Returns the {@link Storage} instance matching the specified storage file name.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
+
function getStorageSync(path: string): Storage;
function getStorage(path: string, callback: AsyncCallback): void;
function getStorage(path: string): Promise;
@@ -49,7 +52,8 @@ declare namespace storage {
*
* @param path Indicates the path of storage file
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
function deleteStorageSync(path: string): void;
function deleteStorage(path: string, callback: AsyncCallback): void;
@@ -65,7 +69,8 @@ declare namespace storage {
*
* @param path Indicates the path of storage file.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
function removeStorageFromCacheSync(path: string): void;
function removeStorageFromCache(path: string, callback: AsyncCallback): void;
@@ -80,8 +85,9 @@ declare namespace storage {
* to remove the {@link Storage} instance from the memory.
*
* @syscap SystemCapability.DistributedDataManager.Preferences.Core
- *
- * @since 5
+ *
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
interface Storage {
/**
@@ -93,7 +99,8 @@ declare namespace storage {
* @param defValue Indicates the default value to return.
* @return Returns the value matching the specified key if it is found; returns the default value otherwise.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
getSync(key: string, defValue: ValueType): ValueType;
get(key: string, defValue: ValueType, callback: AsyncCallback): void;
@@ -106,7 +113,8 @@ declare namespace storage {
* @return Returns {@code true} if the {@link Storage} object contains a storage with the specified key;
* returns {@code false} otherwise.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
hasSync(key: string): boolean;
has(key: string, callback: AsyncCallback): boolean;
@@ -122,7 +130,8 @@ declare namespace storage {
* @param value Indicates the value of the storage.
* MAX_KEY_LENGTH.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
putSync(key: string, value: ValueType): void;
put(key: string, value: ValueType, callback: AsyncCallback): void;
@@ -137,7 +146,8 @@ declare namespace storage {
* @param key Indicates the key of the storage to delete. It cannot be {@code null} or empty.
* MAX_KEY_LENGTH.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
deleteSync(key: string): void;
delete(key: string, callback: AsyncCallback): void;
@@ -150,7 +160,8 @@ declare namespace storage {
* file.
*
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
clearSync(): void;
clear(callback: AsyncCallback): void;
@@ -160,7 +171,8 @@ declare namespace storage {
* Asynchronously saves the {@link Storage} object to the file.
*
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
flushSync(): void;
flush(callback: AsyncCallback): void;
@@ -171,7 +183,8 @@ declare namespace storage {
*
* @param callback Indicates the callback when storage changes.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
on(type: 'change', callback: Callback): void;
@@ -180,7 +193,8 @@ declare namespace storage {
*
* @param callback Indicates the registered callback.
* @throws BusinessError if invoked failed
- * @since 5
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
off(type: 'change', callback: Callback): void;
}
@@ -194,8 +208,9 @@ declare namespace storage {
* Define the change data information object.
*
* @syscap SystemCapability.DistributedDataManager.Preferences.Core
- *
- * @since 5
+ *
+ * @since 6
+ * @deprecated since 9, please use @ohos.data.preferences instead.
*/
interface StorageObserver {
/**
@@ -215,4 +230,4 @@ declare namespace storage {
const MAX_VALUE_LENGTH: 8192;
}
-export default storage;
\ No newline at end of file
+export default storage;
diff --git a/api/@ohos.deviceInfo.d.ts b/api/@ohos.deviceInfo.d.ts
index 18cca631741489f9a1ba67241cfafc5ef11ecdc4..8e91729a901cf1b776dfa7611728b7a507c71410 100644
--- a/api/@ohos.deviceInfo.d.ts
+++ b/api/@ohos.deviceInfo.d.ts
@@ -17,7 +17,7 @@
* A static class pertaining to the product information.
*
* @since 6
- * @Syscap SystemCapability.Startup.SysInfo
+ * @syscap SystemCapability.Startup.SysInfo
*/
declare namespace deviceInfo {
/**
diff --git a/api/@ohos.display.d.ts b/api/@ohos.display.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..024a10daef116b2e7106cb3ebb8439430354318b
--- /dev/null
+++ b/api/@ohos.display.d.ts
@@ -0,0 +1,171 @@
+/*
+* Copyright (c) 2021 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import { AsyncCallback, Callback } from './basic';
+
+/**
+ * interface of display manager
+ * @syscap SystemCapability.WindowManager.WindowManager.Core
+ * @since 7
+ */
+declare namespace display {
+ /**
+ * get the default display
+ * @since 7
+ */
+ function getDefaultDisplay(callback: AsyncCallback): void;
+
+ /**
+ * get the default display
+ * @since 7
+ */
+ function getDefaultDisplay(): Promise;
+
+ /**
+ * get all displays
+ * @since 7
+ */
+ function getAllDisplay(callback: AsyncCallback>): void;
+
+ /**
+ * get all displays
+ * @since 7
+ */
+ function getAllDisplay(): Promise>;
+
+ /**
+ * register the callback of display change
+ * @param type: type of callback
+ * @since 7
+ */
+ function on(type: 'add' | 'remove' | 'change', callback: Callback): void;
+
+ /**
+ * unregister the callback of display change
+ * @param type: type of callback
+ * @since 7
+ */
+ function off(type: 'add' | 'remove' | 'change', callback?: Callback): void;
+
+ /**
+ * the state of display
+ * @syscap SystemCapability.WindowManager.WindowManager.Core
+ * @since 7
+ */
+ enum DisplayState {
+ /**
+ * unknown
+ */
+ STATE_UNKNOWN = 0,
+ /**
+ * screen off
+ */
+ STATE_OFF,
+ /**
+ * screen on
+ */
+ STATE_ON,
+ /**
+ * doze, but it will update for some important system messages
+ */
+ STATE_DOZE,
+ /**
+ * doze and not update
+ */
+ STATE_DOZE_SUSPEND,
+ /**
+ * VR node
+ */
+ STATE_VR,
+ /**
+ * screen on and not update
+ */
+ STATE_ON_SUSPEND,
+ }
+
+ /**
+ * Properties of display, it couldn't update automatically
+ * @syscap SystemCapability.WindowManager.WindowManager.Core
+ * @since 7
+ */
+ interface Display {
+ /**
+ * display id
+ */
+ id: number;
+
+ /**
+ * display name
+ */
+ name: string;
+
+ /**
+ * the display is alive
+ */
+ alive: boolean;
+
+ /**
+ * the state of display
+ */
+ state: DisplayState;
+
+ /**
+ * refresh rate, unit: Hz
+ */
+ refreshRate: number;
+
+ /**
+ * the rotation degrees of the display
+ */
+ rotation: number;
+
+ /**
+ * the width of display, unit: pixel
+ */
+ width: number;
+
+ /**
+ * the height of display, unit: pixel
+ */
+ height: number;
+
+ /**
+ * indicates the display resolution.
+ */
+ densityDPI: number;
+
+ /**
+ * indicates the display density in pixels. The value of a low-resolution display is 1.0
+ */
+ densityPixels: number;
+
+ /**
+ * indicates the text scale density of a display.
+ */
+ scaledDensity: number;
+
+ /**
+ * the DPI on X-axis.
+ */
+ xDPI: number;
+
+ /**
+ * the DPI on Y-axis.
+ */
+ yDPI: number;
+ }
+}
+
+export default display;
\ No newline at end of file
diff --git a/api/@ohos.distributedBundle.d.ts b/api/@ohos.distributedBundle.d.ts
index 90aef0113a27acab1b229dbcdb05bfc4fa8bf73a..e9fea81850f660acc8f9a24d55b3d5006c313f54 100644
--- a/api/@ohos.distributedBundle.d.ts
+++ b/api/@ohos.distributedBundle.d.ts
@@ -23,6 +23,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo';
* @since 8
* @syscap SystemCapability.BundleManager.DistributedBundleFramework
* @permission NA
+ * @systemapi Hide this for inner system use
*/
declare namespace distributedBundle {
/**
@@ -32,7 +33,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo';
* @syscap SystemCapability.BundleManager.DistributedBundleFramework
* @param elementName Indicates the elementName.
* @return Returns the ability info of the remote device.
- * @permission ohos.permission.GET_REMOTE_ABILITY_INFO_PRIVILEGED
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @systemapi
*/
function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback): void;
@@ -45,7 +46,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo';
* @syscap SystemCapability.BundleManager.DistributedBundleFramework
* @param elementNames Indicates the elementNames, Maximum array length ten.
* @return Returns the ability infos of the remote device.
- * @permission ohos.permission.GET_REMOTE_ABILITY_INFO_PRIVILEGED
+ * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @systemapi
*/
function getRemoteAbilityInfos(elementNames: Array, callback: AsyncCallback>): void;
diff --git a/api/@ohos.fileManager.d.ts b/api/@ohos.fileManager.d.ts
index f6df405e7ed3a6456173db27dc557aa37e8ff197..5486431568c4f16b31bffd1884068eca9dc6e903 100644
--- a/api/@ohos.fileManager.d.ts
+++ b/api/@ohos.fileManager.d.ts
@@ -30,7 +30,7 @@ declare namespace filemanager {
*
* @note N/A
* @syscap SystemCapability.FileManagement.FileManagerService
- * @since 8
+ * @since 9
* @permission N/A
* @function listFile
* @param {string} path - path.
@@ -51,7 +51,7 @@ declare function listFile(path: string, type: string, options?: {dev?: DevInfo,
*
* @note N/A
* @syscap SystemCapability.FileManagement.FileManagerService
- * @since 8
+ * @since 9
* @permission N/A
* @function getRoot
* @param {Object} options - options
@@ -68,7 +68,7 @@ declare function getRoot(options?: {dev?: DevInfo}, callback: AsyncCallback) : void;
@@ -290,14 +290,14 @@ declare namespace geolocation {
* satellite status information
*
* @since 8
- * @SysCap SystemCapability.Location.Location.Gnss
+ * @syscap SystemCapability.Location.Location.Gnss
* @permission ohos.permission.LOCATION
*/
export interface SatelliteStatusInfo {
satellitesNumber: number;
satelliteIds: Array;
carrierToNoiseDensitys: Array;
- altitude: Array;
+ altitudes: Array;
azimuths: Array;
carrierFrequencies: Array;
}
@@ -306,7 +306,7 @@ declare namespace geolocation {
* parameters for requesting to report cache location information
*
* @since 8
- * @SysCap SystemCapability.Location.Location.Gnss
+ * @syscap SystemCapability.Location.Location.Gnss
* @permission ohos.permission.LOCATION
*/
export interface CachedGnssLoactionsRequest {
@@ -318,7 +318,7 @@ declare namespace geolocation {
* configuring parameters in geo fence requests
*
* @since 8
- * @SysCap SystemCapability.Location.Location.Geofence
+ * @syscap SystemCapability.Location.Location.Geofence
* @permission ohos.permission.LOCATION
*/
export interface GeofenceRequest {
@@ -331,7 +331,7 @@ declare namespace geolocation {
* configuring parameters in geo fence requests
*
* @since 8
- * @SysCap SystemCapability.Location.Location.Geofence
+ * @syscap SystemCapability.Location.Location.Geofence
* @permission ohos.permission.LOCATION
*/
export interface Geofence {
@@ -346,7 +346,7 @@ declare namespace geolocation {
*
* @since 8
* @systemapi
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
* @param type indicates location privacy protocol type.
* @param callback indicates the callback for reporting the location privacy protocol confirmation status.
@@ -359,7 +359,7 @@ declare namespace geolocation {
*
* @since 8
* @systemapi
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
* @param type indicates location privacy protocol type.
* @param isConfirmed indicates whether the location privacy protocol has been confirmed.
@@ -372,7 +372,7 @@ declare namespace geolocation {
* configuring parameters in reverse geocode requests
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Geocoder
+ * @syscap SystemCapability.Location.Location.Geocoder
* @permission ohos.permission.LOCATION
*/
export interface ReverseGeoCodeRequest {
@@ -386,7 +386,7 @@ declare namespace geolocation {
* configuring parameters in geocode requests
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Geocoder
+ * @syscap SystemCapability.Location.Location.Geocoder
* @permission ohos.permission.LOCATION
*/
export interface GeoCodeRequest {
@@ -403,7 +403,7 @@ declare namespace geolocation {
* data struct describes geographic locations.
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Geocoder
+ * @syscap SystemCapability.Location.Location.Geocoder
* @permission ohos.permission.LOCATION
*/
export interface GeoAddress {
@@ -431,7 +431,7 @@ declare namespace geolocation {
* configuring parameters in location requests
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export interface LocationRequest {
@@ -446,7 +446,7 @@ declare namespace geolocation {
* configuring parameters in current location requests
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export interface CurrentLocationRequest {
@@ -460,7 +460,7 @@ declare namespace geolocation {
* provides information about geographic locations
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export interface Location {
@@ -480,7 +480,7 @@ declare namespace geolocation {
* enum for location priority
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export enum LocationRequestPriority {
@@ -494,7 +494,7 @@ declare namespace geolocation {
* enum for location scenario
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export enum LocationRequestScenario {
@@ -510,7 +510,7 @@ declare namespace geolocation {
* enum for error code
*
* @since 7
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export enum GeoLocationErrorCode {
@@ -527,7 +527,7 @@ declare namespace geolocation {
* enum for location privacy type
*
* @since 8
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export enum LocationPrivacyType {
@@ -540,7 +540,7 @@ declare namespace geolocation {
* Location subsystem command structure
*
* @since 8
- * @SysCap SystemCapability.Location.Location.Core
+ * @syscap SystemCapability.Location.Location.Core
* @permission ohos.permission.LOCATION
*/
export interface LocationCommand {
diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts
index cec604281101c1f0c31084b969968bd8370d1153..b8dc57ffdc71da03f96bcd0d055c1b8c62438992 100644
--- a/api/@ohos.i18n.d.ts
+++ b/api/@ohos.i18n.d.ts
@@ -16,14 +16,14 @@
/**
* Provides international settings related APIs.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 7
*/
declare namespace i18n {
/**
* Obtains the country or region name localized for display on a given locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param country The locale whose country or region name will be displayed.
* @param locale The locale used to display the country or region.
* @param sentenceCase Specifies whether the country or region name is displayed in sentence case.
@@ -35,7 +35,7 @@ export function getDisplayCountry(country: string, locale: string, sentenceCase?
/**
* Obtains the language name localized for display on a given locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param language The locale whose language name will be displayed.
* @param locale The locale used to display the language.
* @param sentenceCase Specifies whether the language name is displayed in sentence case.
@@ -47,7 +47,7 @@ export function getDisplayLanguage(language: string, locale: string, sentenceCas
/**
* Obtain all languages supported by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns all languages supported by the system.
* @since 7
* @systemapi Hide this for inner system use.
@@ -57,7 +57,7 @@ export function getSystemLanguages(): Array;
/**
* Obtain all regions supported by the system in the language.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param language The language used to get the list of regions.
* @return Returns all regions supported by the system in the language.
* @since 7
@@ -68,7 +68,7 @@ export function getSystemCountries(language: string): Array;
/**
* Determine whether the current language or region is recommended.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param language The language code.
* @param region The region code.
* @return Returns whether the current language or region is recommended.
@@ -80,7 +80,7 @@ export function isSuggested(language: string, region?: string): boolean;
/**
* Obtain the language currently used by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the language currently used by the system.
* @since 7
*/
@@ -89,7 +89,7 @@ export function getSystemLanguage(): string;
/**
* Set the language currently used by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param language The language to be used.
* @since 7
* @systemapi Hide this for inner system use.
@@ -99,7 +99,7 @@ export function setSystemLanguage(language: string): boolean;
/**
* Obtain the region currently used by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the region currently used by the system.
* @since 7
*/
@@ -108,7 +108,7 @@ export function getSystemRegion(): string;
/**
* Set the region currently used by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param region The region to be used.
* @since 7
* @systemapi Hide this for inner system use.
@@ -118,7 +118,7 @@ export function setSystemRegion(region: string): boolean;
/**
* Obtain the locale currently used by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the locale currently used by the system.
* @since 7
*/
@@ -127,7 +127,7 @@ export function getSystemLocale(): string;
/**
* Set the locale currently used by the system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale The locale to be used.
* @since 7
* @systemapi Hide this for inner system use.
@@ -137,14 +137,14 @@ export function setSystemLocale(locale: string): boolean;
/**
* Provides util functions.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface Util {
/**
* Convert from unit to to unit and format according to the locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param fromUnit Information of the unit to be converted.
* @param toUnit Information about the unit to be converted to.
* @param value Indicates the number to be formatted.
@@ -158,7 +158,7 @@ export interface Util {
/**
* Provides the options of unit.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface UnitInfo {
@@ -176,7 +176,7 @@ export interface UnitInfo {
/**
* Provides the options of PhoneNumberFormat.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface PhoneNumberFormatOptions {
@@ -189,14 +189,14 @@ export interface PhoneNumberFormatOptions {
/**
* Provides the API for formatting phone number strings
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class PhoneNumberFormat {
/**
* A constructor used to create a PhoneNumberFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param country Indicates a character string containing the country information for the PhoneNumberFormat object.
* @param type Indicates the type used to format the phone number, includes: "E164", "RFC3966", "INTERNATIONAL", "NATIONAL".
* @since 8
@@ -206,7 +206,7 @@ export class PhoneNumberFormat {
/**
* Judges whether phone number is valid.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param number Indicates the input phone number to be judged.
* @return Returns a boolean indicates whether the input phone number is valid.
* @since 8
@@ -216,7 +216,7 @@ export class PhoneNumberFormat {
/**
* Obtains the formatted phone number strings of number.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param number Indicates the input phone number to be formatted.
* @return Returns the formatted phone number.
* @since 8
@@ -227,7 +227,7 @@ export class PhoneNumberFormat {
/**
* Get a Calendar instance specified by locale and type.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale The locale used to get calendar.
* @param type If type is not specified, get locale's default Calendar, else get the specified type of Calendar.
* such as buddhist, chinese, coptic, ethiopic, hebrew, gregory, indian, islamic_civil, islamic_tbla, islamic_umalqura,
@@ -240,7 +240,7 @@ export class Calendar {
/**
* set the date.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param date Date object used to set the time and date.
* @since 8
*/
@@ -249,7 +249,7 @@ export class Calendar {
/**
* set the time.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param time Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT.
* @since 8
*/
@@ -258,7 +258,7 @@ export class Calendar {
/**
* Set the time
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param year The year field of the calendar, ranges from 0 to 9999.
* @param month The month field of the calendar, ranges from 0 to 11.
* @param date The day field of the calendar, ranges from 1 to 31.
@@ -272,7 +272,7 @@ export class Calendar {
/**
* Set the timezone of this calendar.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param timezone The id of a timezone.
* @since 8
*/
@@ -281,7 +281,7 @@ export class Calendar {
/**
* Get the timezone id of this calendar instance.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the timezone id of this calendar.
* @since 8
*/
@@ -290,7 +290,7 @@ export class Calendar {
/**
* Get the start day of a week. 1 indicates Sunday, 7 indicates Saturday.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns start day of a week.
* @since 8
*/
@@ -299,7 +299,7 @@ export class Calendar {
/**
* Set the start day of a week. 1 indicates Sunday, 7 indicates Saturday.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param value Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday.
* @since 8
*/
@@ -308,7 +308,7 @@ export class Calendar {
/**
* Get the minimal days of a week, which is needed for the first day of a year.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the minimal days of a week.
* @since 8
*/
@@ -317,7 +317,7 @@ export class Calendar {
/**
* Set the minimal days of a week, which is needed for the first week of a year.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param value The value to be set.
* @since 8
*/
@@ -326,7 +326,7 @@ export class Calendar {
/**
* Get the associated value with the field.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param field Field values such as era, year, month, week_of_year, week_of_month, date, day_of_year, day_of_week
* day_of_week_in_month, hour, hour_of_day, minute, second, millisecond, zone_offset, dst_offset, year_woy,
* dow_local, extended_year, julian_day, milliseconds_in_day, is_leap_month.
@@ -338,7 +338,7 @@ export class Calendar {
/**
* Get calendar's name localized for display in the given locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale Locale used to get the localized name for this calendar.
* @return Returns the localized name of this calendar.
* @since 8
@@ -349,7 +349,7 @@ export class Calendar {
* Returns true if the given date is a weekend day. If the date is not given,
* the date object of this calendar is used.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param date Date object whose attribute is desired.
* @return Returns whether the date is a weekend day.
* @since 8
@@ -360,7 +360,7 @@ export class Calendar {
/**
* Judge whether the locale is RTL locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale The locale to be used.
* @return Returns true representing the locale is an RTL locale
*
@@ -371,7 +371,7 @@ export function isRTL(locale: string): boolean;
/**
* Obtains a BreakIterator object for finding the location of break point in text.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale the returned BreakIterator will adapt the rule, specified by the locale, to break text.
* @return Returns a newly constructed BreakIterator object.
* @since 8
@@ -381,14 +381,14 @@ export function isRTL(locale: string): boolean;
/**
* The BreakIterator class is used for finding the location of break point in text.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class BreakIterator {
/**
* Obtains the current position of the BreakIterator instance.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the current position of the BreakIterator instance.
* @since 8
*/
@@ -398,7 +398,7 @@ export class BreakIterator {
* Set the BreakIterator's position to the first break point, the first break point is always the beginning of the
* processed text.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the index of the first break point.
* @since 8
*/
@@ -408,7 +408,7 @@ export class BreakIterator {
* Set the BreakIterator's position to the last break point. the last break point is always the index beyond the
* last character of the processed text.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the index of the last break point.
* @since 8
*/
@@ -417,7 +417,7 @@ export class BreakIterator {
/**
* Set the BreakItertor's position to the nth break point from the current break point.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param index indicates the number of break points to advance. If index is not given, n is treated as 1.
* @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1.
* @since 8
@@ -427,7 +427,7 @@ export class BreakIterator {
/**
* Set the BreakItertor's position to the break point preceding the current break point.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1.
* @since 8
*/
@@ -436,7 +436,7 @@ export class BreakIterator {
/**
* Set the text to be processed.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param text Indicates the text to be processed by the BreakIterator.
* @since 8
*/
@@ -445,7 +445,7 @@ export class BreakIterator {
/**
* Set the BreakIterator's position to the first break point following the specified offset.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the index of the BreakIterator after moving. If there is not enough break points, returns -1.
* @since 8
*/
@@ -454,7 +454,7 @@ export class BreakIterator {
/**
* Obtains the text being processed.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the text that is processed by the BreakIterator.
* @since 8
*/
@@ -465,7 +465,7 @@ export class BreakIterator {
* position will be set to the position indicated by the offset if it returns true, otherwise the BreakIterator
* will be moved to the break point following the offset.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param offset The offset to be checked.
* @return Returns true if the offset is a break point.
* @since 8
@@ -477,14 +477,14 @@ export class BreakIterator {
* Sequence text can be grouped under the specified area,
* and grouping index with different lengths can be specified.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class IndexUtil {
/**
* Get IndexUtil object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates a character string containing the locale information, including
* the language and optionally the script and region, for the NumberFormat object.
* @return Returns IndexUtil object.
@@ -495,7 +495,7 @@ export class IndexUtil {
/**
* Get a list of labels for use as a UI index
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns a list of labels
* @since 8
*/
@@ -504,7 +504,7 @@ export class IndexUtil {
/**
* Add the index characters from a Locale to the index.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale The locale whose index characters are to be added.
* @since 8
*/
@@ -513,7 +513,7 @@ export class IndexUtil {
/**
* Get corresponding index of the input text.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param text input text
* @since 8
*/
@@ -523,14 +523,14 @@ export class IndexUtil {
/**
* Provides the API for accessing unicode character properties, sunch as whether a character is a digit.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class Character {
/**
* Determines whether the specified code point is a digit character
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a digit character
*/
@@ -539,7 +539,7 @@ export class Character {
/**
* Determines if the specified character is a space character or not.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a space character
*/
@@ -548,7 +548,7 @@ export class Character {
/**
* Determines if the specified character is a whitespace character
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a whitespace character
*/
@@ -557,7 +557,7 @@ export class Character {
/**
* Determines if the specified character is a RTL character or not.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a RTL character
*/
@@ -566,7 +566,7 @@ export class Character {
/**
* Determines if the specified character is a Ideographic character or not.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a Ideographic character
*/
@@ -575,7 +575,7 @@ export class Character {
/**
* Determines if the specified character is a Letter or not.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a Letter
*/
@@ -584,7 +584,7 @@ export class Character {
/**
* Determines if the specified character is a LowerCase character or not.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a LowerCase character
*/
@@ -593,7 +593,7 @@ export class Character {
/**
* Determines if the specified character is a UpperCase character or not.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns true if the character is a UpperCase character
*/
@@ -602,7 +602,7 @@ export class Character {
/**
* Get the general category value of the specified character.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param char the character to be tested
* @return Returns the general category of the specified character.
*/
@@ -612,7 +612,7 @@ export class Character {
/**
* check out whether system is 24-hour system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns a boolean represent whether system is 24-hour system.
* @since 8
*/
@@ -621,7 +621,7 @@ export class Character {
/**
* set 24-hour system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param option represent the boolean to be set.
* @return Returns a boolean represent whether setting 24-hour system success.
* @since 8
@@ -631,7 +631,7 @@ export class Character {
/**
* Add one language to preferred language List.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param language the language to be added.
* @param index the position of preferred language list to be inserted.
* @return Returns a boolean represent whether language added success.
@@ -642,7 +642,7 @@ export function addPreferredLanguage(language: string, index?: number): boolean;
/**
* Remove one language from preferred language list.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param index the position of removed language in preferred language list.
* @return Returns a boolean represent whether removed success.
* @since 8
@@ -652,7 +652,7 @@ export function removePreferredLanguage(index: number): boolean;
/**
* Access the system preferred language list.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns a string Array represent the preferred language list.
* @since 8
*/
@@ -661,7 +661,7 @@ export function getPreferredLanguageList(): Array;
/**
* Get the first preferred language of system.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns a string represent the first preferred language of system.
* @since 8
*/
diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts
index 2a1bcdda7275691cb16a09c5fef05809dce04de5..cf384e60714bb09a5b1c4c8cf74b696bd4338119 100755
--- a/api/@ohos.intl.d.ts
+++ b/api/@ohos.intl.d.ts
@@ -16,7 +16,7 @@
/**
* Provides internationalization related APIs.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
declare namespace intl {
@@ -24,7 +24,7 @@ declare namespace intl {
* Provides the options of Locale.
*
* @since 8
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
*/
export interface LocaleOptions {
/**
@@ -73,24 +73,33 @@ export interface LocaleOptions {
/**
* Provides APIs for obtaining locale information.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
export class Locale {
/**
* A constructor used to create a Locale object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
+ * @since 6
+ */
+ constructor();
+
+ /**
+ * A constructor used to create a Locale object.
+ *
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates a character string containing the locale information, including
* the language and optionally the script and region.
+ * @param options Indicates Locale option object use to initialize the Locale object.
* @since 6
*/
- constructor(locale?: string, options?: LocaleOptions);
+ constructor(locale: string, options?: LocaleOptions);
/**
* Indicates the language of the locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
language: string
@@ -98,7 +107,7 @@ export class Locale {
/**
* Indicates the script of the locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
script: string
@@ -106,7 +115,7 @@ export class Locale {
/**
* Indicates the region of the locale.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
region: string
@@ -115,7 +124,7 @@ export class Locale {
* Indicates the basic locale information, which is returned as a substring of
* a complete locale string.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
baseName: string
@@ -153,7 +162,7 @@ export class Locale {
/**
* Convert the locale information to string.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns locale information in string form.
*/
toString(): string;
@@ -161,7 +170,7 @@ export class Locale {
/**
* Maximize the locale's base information.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns maximized locale.
*/
maximize(): Locale;
@@ -169,7 +178,7 @@ export class Locale {
/**
* Minimize the locale's base information.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns minimized locale.
*/
minimize(): Locale;
@@ -178,7 +187,7 @@ export class Locale {
/**
* Provides the options of date time format.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
*/
export interface DateTimeOptions {
/**
@@ -280,14 +289,14 @@ export interface DateTimeOptions {
/**
* Provides the API for formatting date strings.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 6
*/
export class DateTimeFormat {
/**
* A constructor used to create a DateTimeFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
constructor();
@@ -295,7 +304,7 @@ export class DateTimeFormat {
/**
* A constructor used to create a DateTimeFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates character string containing the locale information, including
* the language and optionally the script and region, for the DateTimeFormat object.
* @param options Indicates the options used to format the date.
@@ -306,7 +315,7 @@ export class DateTimeFormat {
/**
* Obtains the formatted date strings.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param date Indicates the Date object to be formatted.
* @return Returns a date string formatted based on the specified locale.
* @since 6
@@ -316,7 +325,7 @@ export class DateTimeFormat {
/**
* Obtains the formatted date strings of a date range.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param startDate Indicates the start date of the date range.
* @param endDate Indicates the end date of the date range.
* @return Returns a date string formatted based on the specified locale.
@@ -327,7 +336,7 @@ export class DateTimeFormat {
/**
* Obtains the options of the DateTimeFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the options of the DateTimeFormat object.
* @since 6
*/
@@ -337,7 +346,7 @@ export class DateTimeFormat {
/**
* Provides the options of number format.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
*/
export interface NumberOptions {
/**
@@ -439,13 +448,13 @@ export interface NumberOptions {
/**
* Provides the API for formatting number strings.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
*/
export class NumberFormat {
/**
* A constructor used to create a NumberFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
constructor();
@@ -453,7 +462,7 @@ export class NumberFormat {
/**
* A constructor used to create a NumberFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates a character string containing the locale information, including
* the language and optionally the script and region, for the NumberFormat object.
* @param options Indicates the options used to format the number.
@@ -464,7 +473,7 @@ export class NumberFormat {
/**
* Obtains the formatted number string.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param number Indicates the number to be formatted.
* @return Returns a number string formatted based on the specified locale.
* @since 6
@@ -474,7 +483,7 @@ export class NumberFormat {
/**
* Obtains the options of the NumberFormat object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns the options of the NumberFormat object.
* @since 6
*/
@@ -484,7 +493,7 @@ export class NumberFormat {
/**
* Provides the options of Collator
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface CollatorOptions {
@@ -533,21 +542,21 @@ export interface CollatorOptions {
/**
* Enable language-sensitive string comparison.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class Collator {
/**
* A constructor used to create Collator object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
constructor();
/**
* A constructor used to create Collator Object;
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates a character string containing the locale information, including
* the language and optionally the script and region, for the Collator object.
* @param options Indicates the options used to initialize Collator object.
@@ -558,7 +567,7 @@ export class Collator {
/**
* compares two strings according to the sort order of this Collator object
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param first The first string to compare.
* @param second The second string to compare.
* @return Returns a number indicating how first compare to second:
@@ -573,7 +582,7 @@ export class Collator {
* Returns a new object with properties reflecting the locale and collation options computed
* during initialization of the object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @return Returns a CollatorOptions object reflecting the properties of this object.
* @since 8
*/
@@ -583,7 +592,7 @@ export class Collator {
/**
* Provides the options of PluralRules
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface PluralRulesOptions {
@@ -633,14 +642,14 @@ export interface PluralRulesOptions {
/**
* Enables plural-sensitive formatting and plural-related language rules.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class PluralRules {
/**
* A constructor used to create PluralRules object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
constructor();
@@ -648,7 +657,7 @@ export class PluralRules {
/**
* A constructor used to create PluralRules object.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates a character string containing the locale information, including
* the language and optionally the script and region, for the PluralRules object.
* @param options Indicates the options used to initialize PluralRules object.
@@ -659,7 +668,7 @@ export class PluralRules {
/**
* Returns a string indicating which plural rule to use for locale-aware formatting.
*
- * @sysCap SystemCapability.Global.I18n
+ * @syscap SystemCapability.Global.I18n
* @param n The number to get a plural rule for.
* @return A string representing the pluralization category of the number,
* can be one of zero, one, two, few, many or other.
@@ -671,7 +680,7 @@ export class PluralRules {
/**
* Provides the input options of RelativeTimeFormat.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface RelativeTimeFormatInputOptions {
@@ -697,7 +706,7 @@ export class PluralRules {
/**
* Provides the resolved options of RelativeTimeFormat.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export interface RelativeTimeFormatResolvedOptions {
@@ -728,14 +737,14 @@ export interface RelativeTimeFormatResolvedOptions {
* Given a Time period length value and a unit, RelativeTimeFormat object enables
* language-sensitive relative time formatting.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
export class RelativeTimeFormat {
/**
* A constructor used to create RelativeTimeFormat object.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @since 8
*/
constructor();
@@ -743,7 +752,7 @@ export class RelativeTimeFormat {
/**
* A constructor used to create RelativeTimeFormat object.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @param locale Indicates a character string containing the locale information, including
* the language and optionally the script and region, for the RelativeTimeFormat object.
* @param options Indicates the options used to initialize RelativeTimeFormat object.
@@ -754,7 +763,7 @@ export class RelativeTimeFormat {
/**
* formats a value and unit according to the locale and formatting options of this object.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @param value Numeric value to use in the internationalized relative time message.
* @param unit Unit to use in the relative time internationalized message.
* Possible values are: year, quarter, month, week, day, hour, minute, second.
@@ -767,7 +776,7 @@ export class RelativeTimeFormat {
* returns an Array of objects representing the relative time format in parts that can be used for
* custom locale-aware formatting
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @param value Numeric value to use in the internationalized relative time message.
* @param unit to use in the relative time internationalized message.
* Possible values are: year, quarter, month, week, day, hour, minute, second.
@@ -780,7 +789,7 @@ export class RelativeTimeFormat {
* Returns a new object with properties reflecting the locale and formatting options computed during
* initialization of the object.
*
- * @sysCap SystemCapability.Intl
+ * @syscap SystemCapability.Global.I18n
* @returns RelativeTimeFormatOptions which reflecting the locale and formatting options of the object.
* @since 8
*/
diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts
index 635a260179ca9879324b6c25558f6dd2759501a0..9f779cf3176abbfee0cd1df1608f02d20541aef6 100644
--- a/api/@ohos.matrix4.d.ts
+++ b/api/@ohos.matrix4.d.ts
@@ -16,33 +16,29 @@
/**
* Used to do matrix operations
* @import import Matrix4 from '@ohos.matrix4'
- * @devices phone, tablet, tv, wearable
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
declare namespace matrix4 {
/**
* Set translation parameters
- * @devices phone, tablet, tv, wearable
* @since 7
*/
interface TranslateOption {
/**
* Indicates the translation distance of the x-axis, in px.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
x?: number;
/**
* Indicates the translation distance of the y-axis, in px.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
y?: number;
/**
* Indicates the translation distance of the z-axis, in px.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
z?: number;
@@ -50,41 +46,35 @@ declare namespace matrix4 {
/**
* Set scaling parameters
- * @devices phone, tablet, tv, wearable
* @since 7
*/
interface ScaleOption {
/**
* Zoom factor of the x-axis.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
x?: number;
/**
* Zoom factor of the y-axis.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
y?: number;
/**
* Zoom factor of the z-axis.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
z?: number;
/**
* Transform the x-axis coordinate of the center point.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
centerX?: number;
/**
* Transform the y-axis coordinate of the center point.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
centerY?: number;
@@ -92,48 +82,41 @@ declare namespace matrix4 {
/**
* Set Rotation Parameters.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
interface RotateOption {
/**
* Axis of rotation vector x coordinate.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
x?: number;
/**
* Axis of rotation vector y coordinate.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
y?: number;
/**
* Axis of rotation vector z coordinate.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
z?: number;
/**
* Transform the x-axis coordinate of the center point.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
centerX?: number;
/**
* Transform the y-axis coordinate of the center point.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
centerY?: number;
/**
* Rotation angle.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
angle?: number;
@@ -141,14 +124,12 @@ declare namespace matrix4 {
/**
* Matrix4Transit.
- * @devices phone, tablet, tv, wearable
* @since 7
*/
interface Matrix4Transit {
/**
* Copy function of Matrix, which can copy a copy of the current matrix object.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
copy(): Matrix4Transit;
@@ -156,7 +137,6 @@ declare namespace matrix4 {
/**
* The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
invert(): Matrix4Transit;
@@ -164,55 +144,68 @@ declare namespace matrix4 {
/**
* Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- combine(options:Matrix4Transit): Matrix4Transit;
+ combine(options: Matrix4Transit): Matrix4Transit;
/**
* Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- translate(options:TranslateOption): Matrix4Transit;
+ translate(options: TranslateOption): Matrix4Transit;
/**
* Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- scale(options:ScaleOption): Matrix4Transit;
+ scale(options: ScaleOption): Matrix4Transit;
- /* Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix.
+ /**
+ * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- rotate(options:RotateOption): Matrix4Transit;
+ rotate(options: RotateOption): Matrix4Transit;
/**
* Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- transformPoint(options:[number,number]): [number,number];
+ transformPoint(options: [number, number]): [number, number];
}
/**
* Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- function init(options: [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number]): Matrix4Transit;
+ function init(
+ options: [
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ number,
+ ],
+ ): Matrix4Transit;
/**
* Matrix initialization function, which can return an identity matrix object.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
function identity(): Matrix4Transit;
@@ -220,7 +213,6 @@ declare namespace matrix4 {
/**
* Copy function of Matrix, which can copy a copy of the current matrix object.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
function copy(): Matrix4Transit;
@@ -228,7 +220,6 @@ declare namespace matrix4 {
/**
* The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
function invert(): Matrix4Transit;
@@ -236,42 +227,37 @@ declare namespace matrix4 {
/**
* Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- function combine(options:Matrix4Transit): Matrix4Transit;
+ function combine(options: Matrix4Transit): Matrix4Transit;
/**
* Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- function translate(options:TranslateOption): Matrix4Transit;
+ function translate(options: TranslateOption): Matrix4Transit;
/**
* Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- function scale(options:ScaleOption): Matrix4Transit;
+ function scale(options: ScaleOption): Matrix4Transit;
/**
* Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- function rotate(options:RotateOption): Matrix4Transit;
+ function rotate(options: RotateOption): Matrix4Transit;
/**
* Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point.
* @since 7
- * @devices phone, tablet, tv, wearable
* @return Return to Matrix4Transit
*/
- function transformPoint(options:[number,number]): [number,number];
+ function transformPoint(options: [number, number]): [number, number];
}
-export default matrix4;
\ No newline at end of file
+export default matrix4;
diff --git a/api/@ohos.mediaquery.d.ts b/api/@ohos.mediaquery.d.ts
index fe889218bf4c2fbc32eb5beb197e38dc4c4db719..475e5974cd70a91d1ae956835138c4bf9b61e2c9 100644
--- a/api/@ohos.mediaquery.d.ts
+++ b/api/@ohos.mediaquery.d.ts
@@ -15,6 +15,12 @@
import {Callback} from './basic';
+/**
+ * Used to do mediaquery operations.
+ * @import import mediaquery from '@ohos.mediaquery'
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 7
+ */
declare namespace mediaquery {
interface MediaQueryResult {
@@ -22,14 +28,14 @@ declare namespace mediaquery {
/**
* Whether the match condition is met.
* This parameter is read-only.
- * @since 8
+ * @since 7
*/
readonly matches: boolean;
/**
* Matching condition of a media event.
* This parameter is read-only.
- * @since 8
+ * @since 7
*/
readonly media: string;
}
@@ -39,21 +45,21 @@ declare namespace mediaquery {
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback is triggered when the media attributes change.
- * @since 8
+ * @since 7
*/
on(type: 'change', callback: Callback): void;
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback is not triggered when the media attributes chang.
- * @since 8
+ * @since 7
*/
off(type: 'change', callback?: Callback): void;
}
/**
* Sets the media query criteria and returns the corresponding listening handle
- * @since 8
+ * @since 7
*/
function matchMediaSync(condition: string): MediaQueryListener;
}
diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts
index 9970a64dabd8d1d6632dcfc0ce5793c0aacf190f..817083957e6d243884cd00266677a5fed62cb7fe 100644
--- a/api/@ohos.multimedia.audio.d.ts
+++ b/api/@ohos.multimedia.audio.d.ts
@@ -690,6 +690,7 @@ declare namespace audio {
* Interrupt force type.
* @since 8
* @syscap SystemCapability.Multimedia.Audio.Renderer
+ * @systemapi
*/
enum InterruptForceType {
/**
@@ -782,7 +783,7 @@ declare namespace audio {
* Enumerates audio scenes.
* @since 8
* @syscap SystemCapability.Multimedia.Audio.Communication
- */
+ */
enum AudioScene {
/**
* Default audio scene
@@ -1030,12 +1031,14 @@ declare namespace audio {
* This method uses an asynchronous callback to return the execution result.
* @since 8
* @syscap SystemCapability.Multimedia.Audio.Communication
+ * @systemapi
*/
setAudioScene(scene: AudioScene, callback: AsyncCallback ): void;
/**
* Sets the audio scene mode to change audio strategy. This method uses a promise to return the execution result.
* @since 8
* @syscap SystemCapability.Multimedia.Audio.Communication
+ * @systemapi
*/
setAudioScene(scene: AudioScene): Promise;
/**
@@ -1043,7 +1046,7 @@ declare namespace audio {
* @since 8
* @syscap SystemCapability.Multimedia.Audio.Communication
*/
- getAudioScene(callback: AsyncCallback ): void;
+ getAudioScene(callback: AsyncCallback): void;
/**
* Obtains the system audio scene mode. This method uses a promise to return the execution result.
* @since 8
@@ -1391,6 +1394,7 @@ declare namespace audio {
* @return InterruptEvent callback.
* @since 8
* @syscap SystemCapability.Multimedia.Audio.Renderer
+ * @systemapi
*/
on(type: 'interrupt', callback: Callback): void;
/**
diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts
index da3700eec7a52597c2696687190e670e9e4f6825..74aef73ea4ae607f1f2fb7a083bea55be07da74f 100644
--- a/api/@ohos.multimedia.image.d.ts
+++ b/api/@ohos.multimedia.image.d.ts
@@ -162,6 +162,7 @@ declare namespace image {
* The componet type of image.
* @since 8
* @syscap SystemCapability.Multimedia.Image.ImageReceiver
+ * @systemapi
*/
enum ComponentType {
/**
@@ -374,6 +375,7 @@ declare namespace image {
* Describes image color components.
* @since 8
* @syscap SystemCapability.Multimedia.Image.Core
+ * @systemapi
*/
interface Component {
/**
@@ -483,6 +485,7 @@ declare namespace image {
* {@link ImageFormat} constants. Note that not all formats are supported, like ImageFormat.NV21.
* @param capacity The maximum number of images the user will want to access simultaneously.
* @return Returns the ImageReceiver instance if the operation is successful; returns null otherwise.
+ * @systemapi
*/
function createImageReceiver(width: number, height: number, format: number, capacity: number): ImageReceiver;
@@ -817,6 +820,7 @@ declare namespace image {
* Provides basic image operations, including obtaining image information, and reading and writing image data.
* @since 8
* @syscap SystemCapability.Multimedia.Image.Core
+ * @systemapi
*/
interface Image {
/**
@@ -879,6 +883,7 @@ declare namespace image {
* Image receiver object.
* @since 8
* @syscap SystemCapability.Multimedia.Image.ImageReceiver
+ * @systemapi
*/
interface ImageReceiver {
/**
diff --git a/api/@ohos.multimedia.media.d.ts b/api/@ohos.multimedia.media.d.ts
old mode 100755
new mode 100644
index c33f70bef3721965f684172ae32d90933aa3329b..c08a3fb85b99b7d3acc14cbf6d3648ac7abba111
--- a/api/@ohos.multimedia.media.d.ts
+++ b/api/@ohos.multimedia.media.d.ts
@@ -62,6 +62,7 @@ declare namespace media {
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
* @import import media from '@ohos.multimedia.media'
* @param callback Callback used to return AudioPlayer instance if the operation is successful; returns null otherwise.
+ * @systemapi
*/
function createVideoRecorder(callback: AsyncCallback): void;
/**
@@ -70,6 +71,7 @@ declare namespace media {
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
* @import import media from '@ohos.multimedia.media'
* @return A Promise instance used to return VideoRecorder instance if the operation is successful; returns null otherwise.
+ * @systemapi
*/
function createVideoRecorder(): Promise;
@@ -349,12 +351,40 @@ declare namespace media {
* @deprecated since 8
*/
enum AudioEncoder {
+ /**
+ * Default audio encoding format, which is AMR-NB.
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ DEFAULT = 0,
+
+ /**
+ * Indicates the AMR-NB audio encoding format.
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ AMR_NB = 1,
+
+ /**
+ * Indicates the AMR-WB audio encoding format.
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ AMR_WB = 2,
+
/**
* Advanced Audio Coding Low Complexity (AAC-LC).
* @since 6
* @syscap SystemCapability.Multimedia.Media.AudioRecorder
*/
AAC_LC = 3,
+
+ /**
+ * High-Efficiency Advanced Audio Coding (HE-AAC).
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ HE_AAC = 4
}
/**
@@ -365,6 +395,13 @@ declare namespace media {
* @deprecated since 8
*/
enum AudioOutputFormat {
+ /**
+ * Default audio output format, which is Moving Pictures Expert Group 4 (MPEG-4).
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ DEFAULT = 0,
+
/**
* Indicates the Moving Picture Experts Group-4 (MPEG4) media format.
* @since 6
@@ -372,6 +409,20 @@ declare namespace media {
*/
MPEG_4 = 2,
+ /**
+ * Indicates the Adaptive Multi-Rate Narrowband (AMR-NB) media format.
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ AMR_NB = 3,
+
+ /**
+ * Indicates the Adaptive Multi-Rate Wideband (AMR-WB) media format.
+ * @since 6
+ * @syscap SystemCapability.Multimedia.Media.AudioRecorder
+ */
+ AMR_WB = 4,
+
/**
* Audio Data Transport Stream (ADTS), a transmission stream format of Advanced Audio Coding (AAC) audio.
* @since 6
@@ -559,6 +610,7 @@ declare namespace media {
* Describes video recorder states.
* @since 8
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
+ * @systemapi
*/
type VideoRecordState = 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error';
@@ -567,6 +619,7 @@ declare namespace media {
* to create an VideoRecorder instance.
* @since 8
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
+ * @systemapi
*/
interface VideoRecorder {
/**
@@ -1158,6 +1211,7 @@ declare namespace media {
* Provides the video recorder profile definitions.
* @since 8
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
+ * @systemapi
*/
interface VideoRecorderProfile {
/**
@@ -1236,6 +1290,7 @@ declare namespace media {
* @since 8
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
* @import import media from '@ohos.multimedia.media'
+ * @systemapi
*/
enum AudioSourceType {
/**
@@ -1257,6 +1312,7 @@ declare namespace media {
* @since 8
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
* @import import media from '@ohos.multimedia.media'
+ * @systemapi
*/
enum VideoSourceType {
/**
@@ -1277,6 +1333,7 @@ declare namespace media {
* Provides the video recorder configuration definitions.
* @since 8
* @syscap SystemCapability.Multimedia.Media.VideoRecorder
+ * @systemapi
*/
interface VideoRecorderConfig {
/**
diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts
index 32b8fd0b1add3e489963b3b240982c1344889f00..45a0cbd12502e79e1bab4a00677720d3d313b626 100644
--- a/api/@ohos.multimedia.mediaLibrary.d.ts
+++ b/api/@ohos.multimedia.mediaLibrary.d.ts
@@ -13,8 +13,8 @@
* limitations under the License.
*/
-import { AsyncCallback } from './basic';
-import Context from './@ohos.ability';
+import { AsyncCallback, Callback } from './basic';
+import { Context } from './app/context';
import image from './@ohos.multimedia.image';
/**
@@ -38,7 +38,7 @@ declare namespace mediaLibrary {
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @StageModelOnly
- * @param Hap context information
+ * @param context hap context information
* @return Instance of MediaLibrary
*/
function getMediaLibrary(context: Context): MediaLibrary;
@@ -262,62 +262,71 @@ declare namespace mediaLibrary {
* If it is a directory where the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param callback, Callback return the result of isDerectory.
+ * @permission ohos.permission.READ_MEDIA
+ * @param callback Callback return the result of isDerectory.
*/
isDirectory(callback: AsyncCallback): void;
/**
* If it is a directory where the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
*/
isDirectory():Promise;
/**
* Modify meta data where the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param callback, no value will be returned.
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
+ * @param callback no value will be returned.
*/
commitModify(callback: AsyncCallback): void;
/**
* Modify meta data where the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
*/
commitModify(): Promise;
/**
* Open the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param mode, mode for open, for example: rw, r, w.
- * @param callback, Callback return the fd of the file.
+ * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA
+ * @param mode mode for open, for example: rw, r, w.
+ * @param callback Callback return the fd of the file.
*/
open(mode: string, callback: AsyncCallback): void;
/**
* Open the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param mode, mode for open, for example: rw, r, w.
+ * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA
+ * @param mode mode for open, for example: rw, r, w.
*/
open(mode: string): Promise;
/**
* Close the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param fd, fd of the file which had been opened
- * @param callback, no value will be returned.
+ * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA
+ * @param fd fd of the file which had been opened
+ * @param callback no value will be returned.
*/
close(fd: number, callback: AsyncCallback): void;
/**
* Close the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param fd, fd of the file which had been opened
+ * @permission ohos.permission.READ_MEDIA | ohos.permission.WRITE_MEDIA
+ * @param fd fd of the file which had been opened
*/
close(fd: number): Promise;
/**
* Get thumbnail of the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param callback Callback used to return the thumbnail's pixelmap.
*/
getThumbnail(callback: AsyncCallback): void;
@@ -325,7 +334,8 @@ declare namespace mediaLibrary {
* Get thumbnail of the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param size, thumbnail's size
+ * @permission ohos.permission.READ_MEDIA
+ * @param size thumbnail's size
* @param callback Callback used to return the thumbnail's pixelmap.
*/
getThumbnail(size: Size, callback: AsyncCallback): void;
@@ -333,13 +343,15 @@ declare namespace mediaLibrary {
* Get thumbnail of the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param size, thumbnail's size
+ * @permission ohos.permission.READ_MEDIA
+ * @param size thumbnail's size
*/
getThumbnail(size?: Size): Promise;
/**
* Set favorite for the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
* @param isFavorite ture is favorite file, false is not favorite file
* @param callback Callback used to return, No value is returned.
*/
@@ -348,6 +360,7 @@ declare namespace mediaLibrary {
* Set favorite for the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
* @param isFavorite ture is favorite file, false is not favorite file
*/
favorite(isFavorite: boolean): Promise;
@@ -355,6 +368,7 @@ declare namespace mediaLibrary {
* If the file is favorite when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param callback Callback used to return true or false.
*/
isFavorite(callback: AsyncCallback): void;
@@ -362,27 +376,31 @@ declare namespace mediaLibrary {
* If the file is favorite when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
*/
isFavorite():Promise;
/**
* Set trash for the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
* @param isTrash true is trashed file, false is not trashed file
- * @param callback Callback used to return, No value is returned.
+ * @param callback Callback used to return, No value is returned.
*/
trash(isTrash: boolean, callback: AsyncCallback): void;
/**
* Set trash for the file when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
* @param isTrash true is trashed file, false is not trashed file
*/
- trash(isTrash: boolean,): Promise;
+ trash(isTrash: boolean): Promise;
/**
* If the file is in trash when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param callback Callback used to return true or false.
*/
isTrash(callback: AsyncCallback): void;
@@ -390,6 +408,7 @@ declare namespace mediaLibrary {
* If the file is in trash when the file is located.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
*/
isTrash():Promise;
}
@@ -535,7 +554,7 @@ declare namespace mediaLibrary {
*/
selectionArgs: Array;
/**
- * Sorting criterion of the retrieval results, for example, order: "datetaken DESC,_display_name DESC, _id DESC".
+ * Sorting criterion of the retrieval results, for example, order: "datetaken DESC,display_name DESC, file_id DESC".
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
*/
@@ -731,6 +750,7 @@ declare namespace mediaLibrary {
* Modify the meta data for the album
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
* @param callback, no value will be returned.
*/
commitModify(callback: AsyncCallback): void;
@@ -738,12 +758,14 @@ declare namespace mediaLibrary {
* Modify the meta data for the album
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
*/
commitModify(): Promise;
/**
* SObtains files in an album. This method uses an asynchronous callback to return the files.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param callback Callback used to return the files in the format of a FetchFileResult instance.
*/
getFileAssets(callback: AsyncCallback): void;
@@ -751,6 +773,7 @@ declare namespace mediaLibrary {
* SObtains files in an album. This method uses an asynchronous callback to return the files.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param option Media retrieval options.
* @param callback Callback used to return the files in the format of a FetchFileResult instance.
*/
@@ -759,6 +782,7 @@ declare namespace mediaLibrary {
* Obtains files in an album. This method uses a promise to return the files.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param option Media retrieval options.
* @return A Promise instance used to return the files in the format of a FetchFileResult instance.
*/
@@ -821,15 +845,15 @@ declare namespace mediaLibrary {
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @param type, public directory predefined in DirectoryType.
- * @param callback, Callback return the FetchFileResult.
+ * @param callback Callback return the FetchFileResult.
*/
getPublicDirectory(type: DirectoryType, callback: AsyncCallback): void;
/**
* get system predefined root dir, use to create file asset by relative path
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param type, public directory predefined in DirectoryType.
- * @param return A promise instance used to return the public directory in the format of string
+ * @param type public directory predefined in DirectoryType.
+ * @return A promise instance used to return the public directory in the format of string
*/
getPublicDirectory(type: DirectoryType): Promise;
/**
@@ -837,6 +861,7 @@ declare namespace mediaLibrary {
* if need all data, getAllObject from FetchFileResult
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param options, Media retrieval options.
* @param callback, Callback return the FetchFileResult.
*/
@@ -846,33 +871,35 @@ declare namespace mediaLibrary {
* if need all data, getAllObject from FetchFileResult
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param options, Media retrieval options.
+ * @permission ohos.permission.READ_MEDIA
+ * @param options Media retrieval options.
* @return A promise instance used to return the files in the format of a FetchFileResult instance
*/
getFileAssets(options: MediaFetchOptions): Promise;
/**
- * Trun on mornitor the data changes by media type
+ * Turn on mornitor the data changes by media type
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param type, mediaType
+ * @param type one of 'deviceChange','albumChange','imageChange','audioChange','videoChange','fileChange','remoteFileChange'
* @param callback no value returned
*/
- on(type: 'Device'|'Album'|'Image'|'Audio'|'Video'|'File'| 'Remote file', callback: () => {}): void;
+ on(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'|'fileChange'|'remoteFileChange', callback: Callback): void;
/**
- * Trun off Mornitor the data changes by media type
+ * Turn off mornitor the data changes by media type
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param type, mediaType
+ * @param type one of 'deviceChange','albumChange','imageChange','audioChange','videoChange','fileChange','remoteFileChange'
* @param callback no value returned
*/
- off(type: 'Device'|'Album'|'Image'|'Audio'|'Video'|'File'| 'Remote file', callback?: () => {}): void;
+ off(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'|'fileChange'|'remoteFileChange', callback?: Callback): void;
/**
* Create File Asset
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param mediaType, mediaType for example:IMAGE, VIDEO, AUDIO, FILE
- * @param displayName, file name
- * @param relativePath, relative path
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
+ * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE
+ * @param displayName file name
+ * @param relativePath relative path
* @param callback Callback used to return the FileAsset
*/
createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback): void;
@@ -880,9 +907,10 @@ declare namespace mediaLibrary {
* Create File Asset
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param mediaType, mediaType for example:IMAGE, VIDEO, AUDIO, FILE
- * @param displayName, file name
- * @param relativePath, relative path
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
+ * @param mediaType mediaType for example:IMAGE, VIDEO, AUDIO, FILE
+ * @param displayName file name
+ * @param relativePath relative path
* @return A Promise instance used to return the FileAsset
*/
createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise;
@@ -890,22 +918,27 @@ declare namespace mediaLibrary {
* Delete File Asset
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param uri, FileAsset's URI
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
+ * @param uri FileAsset's URI
* @param callback no value returned
+ * @systemapi
*/
deleteAsset(uri: string, callback: AsyncCallback): void;
/**
* Delete File Asset
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA, ohos.permission.WRITE_MEDIA
* @param uri, FileAsset's URI
* @return A Promise instance, no value returned
+ * @systemapi
*/
deleteAsset(uri: string): Promise;
/**
* Obtains albums based on the media retrieval options. This method uses an asynchronous callback to return.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param option Media retrieval options.
* @param callback Callback used to return an album array.
*/
@@ -914,6 +947,7 @@ declare namespace mediaLibrary {
* Obtains albums based on the media retrieval options. This method uses a promise to return the albums.
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
+ * @permission ohos.permission.READ_MEDIA
* @param option Media retrieval options.
* @return A Promise instance used to return an album array.
*/
@@ -985,6 +1019,7 @@ declare namespace mediaLibrary {
* Get Active Peer device information
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore
+ * @permission ohos.permission.READ_MEDIA
* @systemapi
* @param callback, Callback return the list of the active peer devices' information
*/
@@ -993,6 +1028,7 @@ declare namespace mediaLibrary {
* Get Active Peer device information
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore
+ * @permission ohos.permission.READ_MEDIA
* @systemapi
* @return Promise used to return the list of the active peer devices' information
*/
@@ -1001,14 +1037,16 @@ declare namespace mediaLibrary {
* Get all the peer devices' information
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore
+ * @permission ohos.permission.READ_MEDIA
* @systemapi
- * @param callback, Callback return the list of the all the peer devices' information
+ * @param callback Callback return the list of the all the peer devices' information
*/
getAllPeers(callback: AsyncCallback>): void;
/**
* Get all the peer devices' information
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.DistributedCore
+ * @permission ohos.permission.READ_MEDIA
* @systemapi
* @return Promise used to return the list of the all the peer devices' information
*/
@@ -1017,7 +1055,7 @@ declare namespace mediaLibrary {
* Release MediaLibrary instance
* @since 8
* @syscap SystemCapability.Multimedia.MediaLibrary.Core
- * @param callback, no value returned
+ * @param callback no value returned
*/
release(callback: AsyncCallback): void;
/**
diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts
index 389f62a0139347e7ba83d2f08cc101962ecbab8f..e10019666ddd9e967e9eefb947365fc997357501 100755
--- a/api/@ohos.multimodalInput.inputConsumer.d.ts
+++ b/api/@ohos.multimodalInput.inputConsumer.d.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-import { AsyncCallback } from './basic';
+import { Callback } from './basic';
/**
* The event of key input management module is configured to subscribe and unsubscribe system keys.
@@ -47,11 +47,11 @@ declare namespace inputConsumer {
* @since 8
* @syscap SystemCapability.MultimodalInput.Input.InputConsumer
* @permission N/A
- * @param type type of the keyevent about input which is to be subscribed.
+ * @param type type of the inputevent about input which is to be subscribed.
* @param keyOption the key events about input which is to be subscribed.
* @param callback callback function, receive reported data.
*/
- function on(type: string, keyOption: KeyOptions, callback: AsyncCallback): void;
+ function on(type: "key", keyOptions: KeyOptions, callback: Callback): void;
/**
* Subscribe system keys.
@@ -59,11 +59,11 @@ declare namespace inputConsumer {
* @since 8
* @syscap SystemCapability.MultimodalInput.Input.InputConsumer
* @permission N/A
- * @param type type of the keyevent about input which is to be subscribed.
+ * @param type type of the inputevent about input which is to be subscribed.
* @param keyOption the key events about input which is to be subscribed.
* @param callback callback function, receive reported data.
*/
- function off(type: string, keyOption: KeyOptions, callback: AsyncCallback): void;
+ function off(type: "key", keyOptions: KeyOptions, callback?: Callback): void;
}
export default inputConsumer;
\ No newline at end of file
diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts
index 9d555afdde77c8873a33342ed88cf9752506fed7..b6ecab57c160bc35a91f068d04def36f56c23288 100644
--- a/api/@ohos.net.http.d.ts
+++ b/api/@ohos.net.http.d.ts
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 Huawei Device Co., Ltd.
+ * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -71,13 +71,38 @@ declare namespace http {
/**
* Registers an observer for HTTP Response Header events.
+ *
+ * @deprecated use on_headersReceive instead since 8.
*/
on(type: "headerReceive", callback: AsyncCallback