# IResourceWithArgs

- 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 IResourceWithArgs {
  withArgs(args: string[]): IResourceWithArgs;
  withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise<void>): IResourceWithArgs;
  withArgsCallbackAsync(callback: (arg: CommandLineArgsCallbackContext) => Promise<void>): IResourceWithArgs;
}
```

## Methods

- [withArgs](/reference/api/typescript/aspire.hosting/iresourcewithargs/withargs.md) -- `method` -- Adds arguments
    ```typescript
  withArgs(args: string[]): IResourceWithArgs
  ```
- [withArgsCallback](/reference/api/typescript/aspire.hosting/iresourcewithargs/withargscallback.md) -- `method` -- Sets command-line arguments via callback
    ```typescript
  withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise<void>): IResourceWithArgs
  ```
- [withArgsCallbackAsync](/reference/api/typescript/aspire.hosting/iresourcewithargs/withargscallbackasync.md) -- `method` -- Sets command-line arguments via async callback
    ```typescript
  withArgsCallbackAsync(callback: (arg: CommandLineArgsCallbackContext) => Promise<void>): IResourceWithArgs
  ```
