# IResourceWithWaitSupport.waitFor

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [IResourceWithWaitSupport](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport.md)
- Version: `13.4.0`
- Kind: `method`

Waits for another resource to be ready

## Definition

```typescript
interface IResourceWithWaitSupport {
  // ... omitted for brevity
  waitFor(
      dependency: IResource,
      waitBehavior?: WaitBehavior): IResourceWithWaitSupport;
}
```

## Signature

```typescript
waitFor(
    dependency: IResource,
    waitBehavior?: WaitBehavior): IResourceWithWaitSupport
```

## Parameters

- `dependency` ([IResource](/reference/api/typescript/aspire.hosting/iresource.md))
- `waitBehavior` ([WaitBehavior](/reference/api/typescript/aspire.hosting/waitbehavior.md)) `optional`

## Returns

[IResourceWithWaitSupport](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport.md) `builder`

## Defined on

- [IResourceWithWaitSupport](/reference/api/typescript/aspire.hosting/iresourcewithwaitsupport.md) -- `interface`
