diff --git a/frameworks/ets/ets/@ohos.app.ability.InsightIntentContext.ets b/frameworks/ets/ets/@ohos.app.ability.InsightIntentContext.ets index 40a7569f487971f41cb11b18a6d4fcf56d24602d..61ea24cf3f0138e09389e01aa913cb09cee6e1dd 100644 --- a/frameworks/ets/ets/@ohos.app.ability.InsightIntentContext.ets +++ b/frameworks/ets/ets/@ohos.app.ability.InsightIntentContext.ets @@ -25,7 +25,7 @@ export default class InsightIntentContext { let p1 = taskpool.execute((): BusinessError => { return this.nativeStartAbilitySync(want); }); - p1.then((e: NullishType) => { + p1.then((e: Any) => { let retError = e as BusinessError; callback(retError, undefined); }, (err: BusinessError): void => { @@ -38,7 +38,7 @@ export default class InsightIntentContext { let p1 = taskpool.execute((): BusinessError => { return this.nativeStartAbilitySync(want); }); - p1.then((e: NullishType) => { + p1.then((e: Any) => { let retError = e as BusinessError; if (retError.code === 0) { resolve(undefined); diff --git a/frameworks/ets/ets/@ohos.app.ability.ServiceExtensionAbility.ets b/frameworks/ets/ets/@ohos.app.ability.ServiceExtensionAbility.ets index b9cba009044207d36b854889dfd3242c846249e1..60028426879ed637545042adf3d88e205c6cdde0 100644 --- a/frameworks/ets/ets/@ohos.app.ability.ServiceExtensionAbility.ets +++ b/frameworks/ets/ets/@ohos.app.ability.ServiceExtensionAbility.ets @@ -40,7 +40,7 @@ export default class ServiceExtensionAbility { private native nativeOnConnectCallback(service: rpc.RemoteObject): boolean; - private checkPromise(obj: NullishType): boolean { + private checkPromise(obj: Any): boolean { if (obj instanceof Promise) { return true; } diff --git a/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets b/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets index bb7fe873a25cd58d7079144e521f376bf0d0ca19..d19c05e3dfecbab991478b4fa334eaa86868f0bc 100644 --- a/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets +++ b/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets @@ -126,7 +126,7 @@ export default class UIExtensionContentSession { let p1 = taskpool.execute((): BusinessError => { return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); - p1.then((e: NullishType) => { + p1.then((e: Any) => { let retError = e as BusinessError; if (retError.code === 0) { callback(null, undefined); @@ -144,7 +144,7 @@ export default class UIExtensionContentSession { let p1 = taskpool.execute((): BusinessError => { return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); - p1.then((e: NullishType) => { + p1.then((e: Any) => { let retError = e as BusinessError; if (retError.code === 0) { resolve(undefined); diff --git a/frameworks/ets/ets/@ohos.app.ability.Want.ets b/frameworks/ets/ets/@ohos.app.ability.Want.ets index 0eb0cec5513d0e12bab15aaace527dff798be831..51521764732a848d053f20686ec3e4fb4f098625 100644 --- a/frameworks/ets/ets/@ohos.app.ability.Want.ets +++ b/frameworks/ets/ets/@ohos.app.ability.Want.ets @@ -17,7 +17,7 @@ import hilog from '@ohos.hilog' import rpc from '@ohos.rpc'; import { RecordData } from '@ohos.base'; -type valueType = NullishType; +type valueType = Any; const DOMAIN_ID = 0xD001300; const TAG = 'WantSerializeTool'; @@ -30,7 +30,7 @@ class RecordWriter { return this.buffer.toString(); } - private writeObject(obj: NullishType): void { + private writeObject(obj: Any): void { if (obj === null) { this.buffer.append('null'); } else if (obj === undefined) { @@ -156,7 +156,7 @@ class RecordWriter { export class RecordSerializeTool { public static stringifyNoThrow(obj: Record): String { try { - return JSON.stringify(obj as Object as Record); + return JSON.stringify(obj as Object as Record); } catch (err) { hilog.error(DOMAIN_ID, TAG, `RecordSerializeTool.stringify error: ${err}`); return ''; diff --git a/frameworks/ets/ets/@ohos.app.ability.abilityManager.ets b/frameworks/ets/ets/@ohos.app.ability.abilityManager.ets index de13d52563654fbab6d4f46cc0af88530807e244..1145a09b6bbe25a39381b160b28e40d8d72db052 100644 --- a/frameworks/ets/ets/@ohos.app.ability.abilityManager.ets +++ b/frameworks/ets/ets/@ohos.app.ability.abilityManager.ets @@ -48,7 +48,7 @@ export default namespace abilityManager { return nativeGetForegroundUIAbilities(); }; let p1 = taskpool.execute(executeFunc); - p1.then((e :NullishType)=>{ + p1.then((e :Any)=>{ let abilities: Array = e as Array; resolve(abilities); }, (err: Error): void => { diff --git a/frameworks/ets/ets/application/UIAbilityContext.ets b/frameworks/ets/ets/application/UIAbilityContext.ets index df5a451dd7f95e04769473c5f00d7dce67847fcc..cf65eea14262407ff982025eb1be71c3a153278d 100644 --- a/frameworks/ets/ets/application/UIAbilityContext.ets +++ b/frameworks/ets/ets/application/UIAbilityContext.ets @@ -465,7 +465,7 @@ export default class UIAbilityContext extends Context { let p1 = taskpool.execute((): BusinessError => { return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); - p1.then((e: NullishType) => { + p1.then((e: Any) => { let retError = e as BusinessError; if (retError.code === 0) { callback(null, undefined); @@ -517,7 +517,7 @@ hideAbility(): Promise { let p1 = taskpool.execute((): BusinessError => { return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); - p1.then((e: NullishType) => { + p1.then((e: Any) => { let retError = e as BusinessError; if (retError.code === 0) { resolve(undefined);