Feature: Fix issue of notification dts

Signed-off-by: xuzhihao <xuzhihao16@huawei.com>
This commit is contained in:
xuzhihao 2022-11-29 11:35:08 +08:00
parent bccb9c6015
commit de57717bbd
5 changed files with 38 additions and 40 deletions

View File

@ -35,7 +35,7 @@ declare namespace commonEvent {
* @since 7
* @param event name of the common event.
* @param callback Specified callback method.
* @return -
* @returns -
* @deprecated since 9
* @useinstead ohos.commonEventManager.publish
*/
@ -48,7 +48,7 @@ declare namespace commonEvent {
* @param event name of the common event.
* @param options Indicate the CommonEventPublishData containing the common event content and attributes.
* @param callback Specified callback method.
* @return -
* @returns -
* @deprecated since 9
* @useinstead ohos.commonEventManager.publish
*/
@ -61,7 +61,7 @@ declare namespace commonEvent {
* @param event Specified the names of the common events.
* @param userId Specified the user to receive the common events.
* @param callback Specified callback method.
* @return -
* @returns -
*
* @systemapi Hide this for inner system use.
* @deprecated since 9
@ -77,7 +77,7 @@ declare namespace commonEvent {
* @param userId Specified the user to receive the common events.
* @param options Indicates the CommonEventPublishData containing the common event content and attributes.
* @param callback Specified callback method.
* @return -
* @returns -
*
* @systemapi Hide this for inner system use.
* @deprecated since 9
@ -91,7 +91,7 @@ declare namespace commonEvent {
* @since 7
* @param subscribeInfo Indicates the information of the subscriber.
* @param callback Specified callback method.
* @return -
* @returns -
* @deprecated since 9
* @useinstead ohos.commonEventManager.createSubscriber
*/
@ -102,7 +102,7 @@ declare namespace commonEvent {
*
* @since 7
* @param subscribeInfo Indicates the information of the subscriber.
* @return Returns common event subscriber object
* @returns Returns common event subscriber object
* @deprecated since 9
* @useinstead ohos.commonEventManager.createSubscriber
*/
@ -114,7 +114,7 @@ declare namespace commonEvent {
* @since 7
* @param subscriber Indicate the subscriber of the common event.
* @param callback Specified callback method.
* @return -
* @returns -
* @deprecated since 9
* @useinstead ohos.commonEventManager.subscribe
*/
@ -126,7 +126,7 @@ declare namespace commonEvent {
* @since 7
* @param subscriber Indicate the subscriber of the common event.
* @param callback Specified callback method.
* @return -
* @returns -
* @deprecated since 9
* @useinstead ohos.commonEventManager.unsubscribe
*/

View File

@ -30,7 +30,7 @@ declare namespace emitter {
* @since 7
* @param event indicate event to subscribe to.
* @param callback indicate callback used to receive the event.
* @return -
* @returns -
*/
function on(event: InnerEvent, callback: Callback<EventData>): void;
@ -41,7 +41,7 @@ declare namespace emitter {
* @since 7
* @param event indicate event to subscribe to in one shot.
* @param callback indicate callback used to receive the event.
* @return -
* @returns -
*/
function once(event: InnerEvent, callback: Callback<EventData>): void;
@ -50,7 +50,7 @@ declare namespace emitter {
*
* @since 7
* @param eventId indicate ID of the event to unsubscribe from.
* @return -
* @returns -
*/
function off(eventId: number): void;
@ -60,7 +60,7 @@ declare namespace emitter {
* @since 7
* @param event indicate event to emit.
* @param data indicate data carried by the event.
* @return -
* @returns -
*/
function emit(event: InnerEvent, data?: EventData): void;

View File

@ -211,7 +211,7 @@ declare namespace notification {
*
* @param slotType Type of the notification slot to obtain.
* @param callback callback function
* @return Returns the created {@link NotificationSlot}.
* @returns Returns the created {@link NotificationSlot}.
* @deprecated since 9
* @useinstead ohos.notificationManager.getSlot
*/
@ -221,7 +221,7 @@ declare namespace notification {
/**
* Obtains all NotificationSlot objects created by the current application.
*
* @return Returns all notification slots of this application.
* @returns Returns all notification slots of this application.
* @deprecated since 9
* @useinstead ohos.notificationManager.getSlots
*/

View File

@ -24,7 +24,6 @@ import { EnabledNotificationCallbackData as _EnabledNotificationCallbackData } f
* @since 9
* @systemapi
* @syscap SystemCapability.Notification.Notification
* @import import notificationSubscribe from '@ohos.notification.subscribe';
* @permission N/A
*/
declare namespace notificationSubscribe {

View File

@ -28,7 +28,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
getCode(callback: AsyncCallback<number>): void;
@ -36,7 +36,7 @@ export interface CommonEventSubscriber {
* Obtains the result code of the current ordered common event.
*
* @since 7
* @return Returns code of this common event
* @returns Returns code of this common event
*/
getCode(): Promise<number>;
@ -46,7 +46,7 @@ export interface CommonEventSubscriber {
* @since 7
* @param code Indicates the custom result code to set. You can set it to any value.
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
setCode(code: number, callback: AsyncCallback<void>): void;
@ -55,7 +55,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param code Indicates the custom result code to set. You can set it to any value.
* @return -
* @returns -
*/
setCode(code: number): Promise<void>;
@ -64,7 +64,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
getData(callback: AsyncCallback<string>): void;
@ -72,8 +72,7 @@ export interface CommonEventSubscriber {
* Obtains the result data of the current ordered common event.
*
* @since 7
* @return
* @return Returns data of this common event
* @returns Returns data of this common event
*/
getData(): Promise<string>;
@ -83,7 +82,7 @@ export interface CommonEventSubscriber {
* @since 7
* @param data Indicates the custom result data to set. You can set it to any character string.
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
setData(data: string, callback: AsyncCallback<void>): void;
@ -92,7 +91,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param data Indicates the custom result data to set. You can set it to any character string.
* @return -
* @returns -
*/
setData(data: string): Promise<void>;
@ -103,7 +102,7 @@ export interface CommonEventSubscriber {
* @param code Indicates the custom result code to set. You can set it to any value.
* @param data Indicates the custom result data to set. You can set it to any character string.
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
setCodeAndData(code: number, data: string, callback: AsyncCallback<void>): void;
@ -113,7 +112,7 @@ export interface CommonEventSubscriber {
* @since 7
* @param code Indicates the custom result code to set. You can set it to any value.
* @param data Indicates the custom result data to set. You can set it to any character string.
* @return -
* @returns -
*/
setCodeAndData(code: number, data: string): Promise<void>;
@ -122,7 +121,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
isOrderedCommonEvent(callback: AsyncCallback<boolean>): void;
@ -130,7 +129,7 @@ export interface CommonEventSubscriber {
* Checks whether the current common event is an ordered common event.
*
* @since 7
* @return Returns true if this common event is ordered, false otherwise
* @returns Returns true if this common event is ordered, false otherwise
*/
isOrderedCommonEvent(): Promise<boolean>;
@ -139,7 +138,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
isStickyCommonEvent(callback: AsyncCallback<boolean>): void;
@ -147,7 +146,7 @@ export interface CommonEventSubscriber {
* Checks whether the current common event is a sticky common event.
*
* @since 7
* @return Returns true if this common event is sticky, false otherwise
* @returns Returns true if this common event is sticky, false otherwise
*/
isStickyCommonEvent(): Promise<boolean>;
@ -156,7 +155,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
abortCommonEvent(callback: AsyncCallback<void>): void;
@ -164,7 +163,7 @@ export interface CommonEventSubscriber {
* Abort the current ordered common event.
*
* @since 7
* @return -
* @returns -
*/
abortCommonEvent(): Promise<void>;
@ -173,7 +172,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
clearAbortCommonEvent(callback: AsyncCallback<void>): void;
@ -181,7 +180,7 @@ export interface CommonEventSubscriber {
* Clears the abort state of the current ordered common event
*
* @since 7
* @return -
* @returns -
*/
clearAbortCommonEvent(): Promise<void>;
@ -190,7 +189,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
getAbortCommonEvent(callback: AsyncCallback<boolean>): void;
@ -198,7 +197,7 @@ export interface CommonEventSubscriber {
* Checks whether the current ordered common event should be aborted.
*
* @since 7
* @return Returns true if this common event is aborted, false otherwise
* @returns Returns true if this common event is aborted, false otherwise
*/
getAbortCommonEvent(): Promise<boolean>;
@ -207,7 +206,7 @@ export interface CommonEventSubscriber {
*
* @since 7
* @param callback Indicate the callback function to receive the common event.
* @return -
* @returns -
*/
getSubscribeInfo(callback: AsyncCallback<CommonEventSubscribeInfo>): void;
@ -215,7 +214,7 @@ export interface CommonEventSubscriber {
* get the CommonEventSubscribeInfo of this CommonEventSubscriber.
*
* @since 7
* @return Returns the commonEvent subscribe information
* @returns Returns the commonEvent subscribe information
*/
getSubscribeInfo(): Promise<CommonEventSubscribeInfo>;
@ -224,7 +223,7 @@ export interface CommonEventSubscriber {
*
* @since 9
* @param callback Indicate the callback function after the ordered common event is finished.
* @return -
* @returns -
*/
finishCommonEvent(callback: AsyncCallback<void>): void;
@ -232,7 +231,7 @@ export interface CommonEventSubscriber {
* finish the current ordered common event.
*
* @since 9
* @return -
* @returns -
*/
finishCommonEvent(): Promise<void>;
}