• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# AbilityResult
2
3The **AbilityResult** module defines the result code and data returned when an ability is terminated after being started. You can use [startAbilityForResult](js-apis-ability-featureAbility.md#featureabilitystartabilityforresult7) to obtain the **AbilityResult** object returned after the started ability is terminated. The started ability returns the **AbilityResult** object by calling [terminateSelfWithResult](js-apis-ability-featureAbility.md#featureabilityterminateselfwithresult7).
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## Modules to Import
10
11```ts
12import ability from '@ohos.ability.ability';
13```
14
15**System capability**: SystemCapability.Ability.AbilityBase
16
17| Name       | Readable   | Writable    | Type                | Mandatory| Description                                                        |
18| ----------- | -------- |-------- | -------------------- | ---- | ------------------------------------------------------------ |
19| resultCode    | Yes   | No     | number               | No  | Result code returned when the ability is started or terminated.                               |
20| want   | Yes   | No     | [Want](./js-apis-app-ability-want.md)               | No  | Data returned when the ability is terminated.|
21