# featureAbility接口切换 | FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 | | -------- | -------- | -------- |
| [getWant(callback: AsyncCallback<Want>): void;](../reference/apis/js-apis-featureAbility.md#featureabilitygetwant)<br/>[getWant(): Promise<Want>;](../reference/apis/js-apis-featureAbility.md#featureabilitygetwant-1) | \@ohos.app.ability.UIAbility.d.ts | [launchWant: Want;](../reference/apis/js-apis-application-ability.md#属性) | | [startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>): void;](../reference/apis/js-apis-featureAbility.md#featureabilitystartability)<br/>[startAbility(parameter: StartAbilityParameter): Promise<number>;](../reference/apis/js-apis-featureAbility.md#featureabilitystartability-1) | application\UIAbilityContext.d.ts | [startAbility(want: Want, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextstartability)<br/>[startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextstartability-1)<br/>[startAbility(want: Want, options?: StartOptions): Promise<void>;](../reference/apis/js-apis-ability-context.md#abilitycontextstartability-2) | | [getContext(): Context;](../reference/apis/js-apis-featureAbility.md#featureabilitygetcontext) | \@ohos.app.ability.UIAbility.d.ts | [context: UIAbilityContext;](../reference/apis/js-apis-application-ability.md#属性) | | [startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>): void;](../reference/apis/js-apis-featureAbility.md#featureabilitystartabilityforresult7)<br/>[startAbilityForResult(parameter: StartAbilityParameter): Promise<AbilityResult>;](../reference/apis/js-apis-featureAbility.md#featureabilitystartabilityforresult7-1) | application\UIAbilityContext.d.ts | [startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextstartabilityforresult)<br/>[startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextstartabilityforresult-1)<br/>[startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>;](../reference/apis/js-apis-ability-context.md#abilitycontextstartabilityforresult-2) | | [terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-featureAbility.md#featureabilityterminateselfwithresult7)<br/>[terminateSelfWithResult(parameter: AbilityResult): Promise<void>;](../reference/apis/js-apis-featureAbility.md#featureabilityterminateselfwithresult7-1) | application\UIAbilityContext.d.ts | [terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextterminateselfwithresult)<br/>[terminateSelfWithResult(parameter: AbilityResult): Promise<void>;](../reference/apis/js-apis-ability-context.md#abilitycontextterminateselfwithresult-1) | | [terminateSelf(callback: AsyncCallback<void>): void;](../reference/apis/js-apis-featureAbility.md#featureabilityterminateself7)<br/>[terminateSelf(): Promise<void>;](../reference/apis/js-apis-featureAbility.md#featureabilityterminateself7-1) | application\UIAbilityContext.d.ts | [terminateSelf(callback: AsyncCallback<void>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextterminateself)<br/>[terminateSelf(): Promise<void>;](../reference/apis/js-apis-ability-context.md#abilitycontextterminateself-1) |
| [acquireDataAbilityHelper(uri: string): DataAbilityHelper;](../reference/apis/js-apis-featureAbility.md#featureabilityacquiredataabilityhelper7) | \@ohos.data.dataShare.d.ts<br/>\@ohos.data.fileAccess.d.ts | [createDataShareHelper(context: Context, uri: string, callback: AsyncCallback<DataShareHelper>): void;](../reference/apis/js-apis-data-dataShare.md#datasharecreatedatasharehelper)<br/>[createDataShareHelper(context: Context, uri: string): Promise<DataShareHelper>;](../reference/apis/js-apis-data-dataShare.md#datasharecreatedatasharehelper-1)<br/>[createFileAccessHelper(context: Context): FileAccessHelper;](../reference/apis/js-apis-fileAccess.md#fileaccesscreatefileaccesshelper-1)<br/>[createFileAccessHelper(context: Context, wants: Array<Want>): FileAccessHelper;](../reference/apis/js-apis-fileAccess.md#fileaccesscreatefileaccesshelper) | | [hasWindowFocus(callback: AsyncCallback<boolean>): void;](../reference/apis/js-apis-featureAbility.md#featureabilityhaswindowfocus7)<br/>[hasWindowFocus(): Promise<boolean>;](../reference/apis/js-apis-featureAbility.md#featureabilityhaswindowfocus7-1) | \@ohos.window.d.ts | [on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void;](../reference/apis/js-apis-window.md#onwindowstageevent9)<br/>监听[Active](../reference/apis/js-apis-window.md#windowstageeventtype9)获焦状态 |
| [connectAbility(request: Want, options:ConnectOptions ): number;](../reference/apis/js-apis-featureAbility.md#featureabilityconnectability7) | application\UIAbilityContext.d.ts | [connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;](../reference/apis/js-apis-ability-context.md#abilitycontextconnectserviceextensionability) | | [disconnectAbility(connection: number, callback:AsyncCallback<void>): void;](../reference/apis/js-apis-featureAbility.md#featureabilitydisconnectability7)<br/>[disconnectAbility(connection: number): Promise<void>;](../reference/apis/js-apis-featureAbility.md#featureabilitydisconnectability7-1) | application\UIAbilityContext.d.ts | [disconnectAbility(connection: number, callback:AsyncCallback<void>): void;](../reference/apis/js-apis-ability-context.md#abilitycontextdisconnectserviceextensionability-1)<br/>[disconnectAbility(connection: number): Promise<void>;](../reference/apis/js-apis-ability-context.md#abilitycontextdisconnectserviceextensionability) |
| [getWindow(callback: AsyncCallback<window.Window>): void;](../reference/apis/js-apis-featureAbility.md#featureabilitygetwindow7)<br/>[getWindow(): Promise<window.Window>;](../reference/apis/js-apis-featureAbility.md#featureabilitygetwindow7-1) | \@ohos.window.d.ts | [getLastWindow(ctx: BaseContext, callback: AsyncCallback<Window>): void;](../reference/apis/js-apis-window.md#windowgetlastwindow9)<br/>[getLastWindow(ctx: BaseContext): Promise<Window>;](../reference/apis/js-apis-window.md#windowgetlastwindow9-1) |