# IResourceWithWaitSupport

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.2.0`
- Kind: `interface`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface IResourceWithWaitSupport {
  waitFor(dependency: IResource): IResourceWithWaitSupport;
  waitForCompletion(
      dependency: IResource,
      exitCode?: number): IResourceWithWaitSupport;
  waitForStart(dependency: IResource): IResourceWithWaitSupport;
  waitForStartWithBehavior(
      dependency: IResource,
      waitBehavior: WaitBehavior): IResourceWithWaitSupport;
  waitForWithBehavior(
      dependency: IResource,
      waitBehavior: WaitBehavior): IResourceWithWaitSupport;
}
```

## Methods

- [waitFor](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport/waitfor.md) -- `method` -- Waits for another resource to be ready
    ```typescript
  waitFor(dependency: IResource): IResourceWithWaitSupport
  ```
- [waitForCompletion](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport/waitforcompletion.md) -- `method` -- Waits for resource completion
    ```typescript
  waitForCompletion(dependency: IResource, exitCode?: number): IResourceWithWaitSupport
  ```
- [waitForStart](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport/waitforstart.md) -- `method` -- Waits for another resource to start
    ```typescript
  waitForStart(dependency: IResource): IResourceWithWaitSupport
  ```
- [waitForStartWithBehavior](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport/waitforstartwithbehavior.md) -- `method` -- Waits for another resource to start with specific behavior
    ```typescript
  waitForStartWithBehavior(dependency: IResource, waitBehavior: WaitBehavior): IResourceWithWaitSupport
  ```
- [waitForWithBehavior](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport/waitforwithbehavior.md) -- `method` -- Waits for another resource with specific behavior
    ```typescript
  waitForWithBehavior(dependency: IResource, waitBehavior: WaitBehavior): IResourceWithWaitSupport
  ```
