mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-23 23:30:15 +00:00
接口变更:emitter.off接口新增第二个可选参数callback
Signed-off-by: Baisong Zhong <zhongbaisong@huawei.com> Change-Id: I293f87b010855c5f013f52b5b8525049ff67307a
This commit is contained in:
parent
1886cd4d93
commit
41752bb1e6
12
api/@ohos.events.emitter.d.ts
vendored
12
api/@ohos.events.emitter.d.ts
vendored
@ -54,6 +54,16 @@ declare namespace emitter {
|
||||
*/
|
||||
function off(eventId: number): void;
|
||||
|
||||
/**
|
||||
* Unsubscribe from an event.
|
||||
*
|
||||
* @param { number } eventId - indicates ID of the event to unsubscribe from.
|
||||
* @param { Callback<EventData> } callback - indicates callback used to receive the event.
|
||||
* @syscap SystemCapability.Notification.Emitter
|
||||
* @since 10
|
||||
*/
|
||||
function off(eventId: number, callback: Callback<EventData>): void;
|
||||
|
||||
/**
|
||||
* Emits an event to the event queue.
|
||||
*
|
||||
@ -115,4 +125,4 @@ declare namespace emitter {
|
||||
}
|
||||
}
|
||||
|
||||
export default emitter;
|
||||
export default emitter;
|
||||
|
Loading…
Reference in New Issue
Block a user