# withArgsCallbackAsync

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

Sets command-line arguments via async callback

## Definition

```typescript
interface ContainerResource {
  // ... omitted for brevity
  withArgsCallbackAsync(callback: (arg: CommandLineArgsCallbackContext) => Promise<void>): IResourceWithArgs
}
```

## Parameters

- `callback` (`(arg: CommandLineArgsCallbackContext) => Promise<void>`)

## Returns

[IResourceWithArgs](/reference/api/typescript/aspire.hosting/iresourcewithargs.md) `builder`

## Applies to

- [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md)
- [ExecutableResource](/reference/api/typescript/aspire.hosting/executableresource.md)
- [ProjectResource](/reference/api/typescript/aspire.hosting/projectresource.md)
- [DotnetToolResource](/reference/api/typescript/aspire.hosting/dotnettoolresource.md)
- [CSharpAppResource](/reference/api/typescript/aspire.hosting/csharpappresource.md)
