diff --git a/frameworks/ani/input_device/ets/@ohos.multimodalInput.inputDevice.ets b/frameworks/ani/input_device/ets/@ohos.multimodalInput.inputDevice.ets index b7a5bb9915ff44f0240dae430eca9e954aa07462..838907a0c4adfd593753a3c1f60e3fe2bbeffc90 100644 --- a/frameworks/ani/input_device/ets/@ohos.multimodalInput.inputDevice.ets +++ b/frameworks/ani/input_device/ets/@ohos.multimodalInput.inputDevice.ets @@ -369,11 +369,11 @@ export namespace inputDevice { function getDeviceList(callback: AsyncCallback>): void { let p1 = taskpool.execute(getDeviceListInner); - p1.then((data: NullishType) => { + p1.then((data: Any) => { let r = data as Array; let err : BusinessError callback(err, r); - }).catch((error: NullishType) => { + }).catch((error: Any) => { let err = error as BusinessError; let data = new Array; callback(err, data); @@ -384,7 +384,7 @@ export namespace inputDevice { let p = new Promise>((resolve: (v: Array) => void, reject: (error: Error) => void) => { let p1 = taskpool.execute(getDeviceListInner); - p1.then((e :NullishType)=>{ + p1.then((e :Any)=>{ let r = e as Array; resolve(r); }).catch((error: Error) : Array => { @@ -396,11 +396,11 @@ export namespace inputDevice { function getDeviceInfo(deviceId: number, callback: AsyncCallback): void { let p1 = taskpool.execute(getDeviceInfoInner, deviceId); - p1.then((data: NullishType) => { + p1.then((data: Any) => { let r = data as InputDeviceData; let err : BusinessError callback(err, r); - }).catch((error: NullishType) => { + }).catch((error: Any) => { let err = error as BusinessError; let data = new InputDeviceDataImpl(0); callback(err, data); @@ -410,7 +410,7 @@ export namespace inputDevice { let p = new Promise((resolve: (v: InputDeviceData) => void, reject: (error: Error) => void) => { let p1 = taskpool.execute(getDeviceInfoInner, deviceId); - p1.then((e :NullishType)=>{ + p1.then((e :Any)=>{ let r = e as InputDeviceData; resolve(r); }).catch((error: Error) : InputDeviceData => {