1/* 2 * Copyright (c) 2021-2023 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 AbilityKit 19 */ 20 21 22import { HapModuleInfo } from '../bundleManager/HapModuleInfo'; 23import { Configuration } from '../@ohos.app.ability.Configuration'; 24import Context from './Context'; 25import { ExtensionAbilityInfo } from '../bundleManager/ExtensionAbilityInfo'; 26 27/** 28 * The context of an extension. It allows access to extension-specific resources. 29 * 30 * @extends Context 31 * @syscap SystemCapability.Ability.AbilityRuntime.Core 32 * @StageModelOnly 33 * @since 9 34 */ 35/** 36 * The context of an extension. It allows access to extension-specific resources. 37 * 38 * @extends Context 39 * @syscap SystemCapability.Ability.AbilityRuntime.Core 40 * @StageModelOnly 41 * @atomicservice 42 * @since arkts {'1.1':'11', '1.2':'20'} 43 * @arkts 1.1&1.2 44 */ 45declare class ExtensionContext extends Context { 46 /** 47 * Indicates configuration information about an module. 48 * 49 * @type { HapModuleInfo } 50 * @syscap SystemCapability.Ability.AbilityRuntime.Core 51 * @StageModelOnly 52 * @since 9 53 */ 54 /** 55 * Indicates configuration information about an module. 56 * 57 * @type { HapModuleInfo } 58 * @syscap SystemCapability.Ability.AbilityRuntime.Core 59 * @StageModelOnly 60 * @atomicservice 61 * @since arkts {'1.1':'11', '1.2':'20'} 62 * @arkts 1.1&1.2 63 */ 64 currentHapModuleInfo: HapModuleInfo; 65 66 /** 67 * Indicates configuration information. 68 * 69 * @type { Configuration } 70 * @syscap SystemCapability.Ability.AbilityRuntime.Core 71 * @StageModelOnly 72 * @since 9 73 */ 74 /** 75 * Indicates configuration information. 76 * 77 * @type { Configuration } 78 * @syscap SystemCapability.Ability.AbilityRuntime.Core 79 * @StageModelOnly 80 * @atomicservice 81 * @since arkts {'1.1':'11', '1.2':'20'} 82 * @arkts 1.1&1.2 83 */ 84 config: Configuration; 85 86 /** 87 * Extension information. 88 * 89 * @type { ExtensionAbilityInfo } 90 * @syscap SystemCapability.Ability.AbilityRuntime.Core 91 * @StageModelOnly 92 * @since 9 93 */ 94 /** 95 * Extension information. 96 * 97 * @type { ExtensionAbilityInfo } 98 * @syscap SystemCapability.Ability.AbilityRuntime.Core 99 * @StageModelOnly 100 * @atomicservice 101 * @since arkts {'1.1':'11', '1.2':'20'} 102 * @arkts 1.1&1.2 103 */ 104 extensionAbilityInfo: ExtensionAbilityInfo; 105} 106 107export default ExtensionContext;