diff --git a/api/@ohos.inputMethodEngine.d.ts b/api/@ohos.inputMethodEngine.d.ts index 622a573b0c5b96cd2ca8cf7f976e5ddb0a1c6cd2..9fcb255df96e413afc61c35e4731715679b11a9b 100644 --- a/api/@ohos.inputMethodEngine.d.ts +++ b/api/@ohos.inputMethodEngine.d.ts @@ -1561,6 +1561,16 @@ declare namespace inputMethodEngine { * @since 20 */ getAttachOptions(): AttachOptions; + + /** + * Get recommended words. + * @param { Array } Keywords for querying recommended words. + * @returns { Recommendation } The recommendation. + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 21 + */ + getRecommendation(keywords: Array): Recommendation; + /** * Subscribe 'attachOptionsDidChange' event. * @@ -2992,6 +3002,25 @@ declare namespace inputMethodEngine { */ CHARACTERS } + + /** + * Recommendataion. + * + * @interface Recommendation + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 21 + */ + export interface Recommendation { + /** + * Recommended words. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 21 + */ + readonly recommendedWords: Array; + } } export default inputMethodEngine;