From 280ad45b5ec253d2d35555c25bee7bbaa2291c8f Mon Sep 17 00:00:00 2001 From: Gabor Aron Takacs Date: Fri, 5 Sep 2025 13:54:44 +0200 Subject: [PATCH] Align typeof for numeric types to latest spec Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICWZGJ Reason: Typeof output needs to be changed in case of numerics. Fixed internal issue: #27651 Change-Id: I415605ceb885bedb6db8fbad166e392861b085ef Signed-off-by: Gabor Aron Takacs --- frameworks/ets/ets/@ohos.notificationManager.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/ets/ets/@ohos.notificationManager.ets b/frameworks/ets/ets/@ohos.notificationManager.ets index bc9a8dfa3..e33a749ad 100644 --- a/frameworks/ets/ets/@ohos.notificationManager.ets +++ b/frameworks/ets/ets/@ohos.notificationManager.ets @@ -256,13 +256,13 @@ export default namespace notificationManager { if (slot == null) { return errorParamInvalid; } - if (slot.lockscreenVisibility !== undefined && typeof slot.lockscreenVisibility === 'number') { + if (slot.lockscreenVisibility !== undefined && typeof slot.lockscreenVisibility === 'int') { const num = slot.lockscreenVisibility ?? -1; if (num < 0) { return errorParamInvalid; } } - if (slot.lightColor !== undefined && typeof slot.lightColor === 'number') { + if (slot.lightColor !== undefined && typeof slot.lightColor === 'int') { const num = slot.lightColor ?? -1; if (num < 0) { return errorParamInvalid; @@ -676,13 +676,13 @@ export default namespace notificationManager { if (request?.appInstanceKey !== undefined && request?.appInstanceKey?.trim() === '') { return errorParamInvalid; } - if (request?.color !== undefined && typeof request.color === 'number') { + if (request?.color !== undefined && typeof request.color === 'long') { const num = request.color ?? -1; if (num < 0) { return errorParamInvalid; } } - if (request?.badgeNumber !== undefined && typeof request.badgeNumber === 'number') { + if (request?.badgeNumber !== undefined && typeof request.badgeNumber === 'long') { const num = request.badgeNumber ?? -1; if (num < 0) { return errorParamInvalid; -- Gitee