diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 000599ed5d287eb42bd8ea5e9894562ac7905021..2d5a313f686a3bd6d48490881860a412a06b2ebc 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -108,7 +108,7 @@ declare namespace preferences { * @throws BusinessError if invoked failed * @since 9 */ - has(key: string, callback: AsyncCallback): boolean; + has(key: string, callback: AsyncCallback): void; has(key: string): Promise; /** @@ -177,7 +177,7 @@ declare namespace preferences { * @throws BusinessError if invoked failed * @since 9 */ - off(type: 'change', callback: Callback<{ key: string }>): void; + off(type: 'change', callback?: Callback<{ key: string }>): void; } /**