1/* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"), 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit FormKit 19 */ 20 21import ExtensionContext from './ExtensionContext'; 22import Want from '../@ohos.app.ability.Want'; 23 24/** 25 * The context of live form extension. It allows access to 26 * liveFormExtension-specific resources. 27 * 28 * @extends ExtensionContext 29 * @syscap SystemCapability.Ability.Form 30 * @stagemodelonly 31 * @atomicservice 32 * @since 20 33 */ 34declare class LiveFormExtensionContext extends ExtensionContext { 35 /** 36 * Start ability belongs to the application 37 * 38 * @param { Want } want - includes ability name, parameters and relative info sending to an ability. 39 * @returns { Promise<void> } The promise returned by the function. 40 * @throws { BusinessError } 801 - Capability not supported due to limited device capabilities. 41 * @throws { BusinessError } 16500050 - An IPC connection error happened. 42 * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 43 * @throws { BusinessError } 16501000 - An internal functional error occurred. 44 * @throws { BusinessError } 16501011 - The form can not support this operation 45 * @syscap SystemCapability.Ability.Form 46 * @stagemodelonly 47 * @atomicservice 48 * @since 20 49 */ 50 startAbilityByLiveForm(want: Want): Promise<void>; 51} 52export default LiveFormExtensionContext; 53