# DenoAppResource.WithDenoTask

- Module: [Aspire.Hosting.JavaScript](/reference/api/go/aspire.hosting.javascript.md)
- Defined on: [DenoAppResource](/reference/api/go/aspire.hosting.javascript/denoappresource.md)
- Version: `17.0.0`
- Kind: `method`

Selects the `deno task <taskName>` mode, running a task defined in `deno.json` instead of a script entrypoint. Permissions are defined by the task itself and are not emitted for this mode.

## Definition

```go
type DenoAppResource interface {
    // ... omitted for brevity
    WithDenoTask(taskName string) DenoAppResource
}
```

## Signature

```go
WithDenoTask(taskName string) DenoAppResource
```

## Parameters

- `taskName` (`string`) -- The name of the task in `deno.json` to run.

## Returns

[`DenoAppResource`](/reference/api/go/aspire.hosting.javascript/denoappresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [DenoAppResource](/reference/api/go/aspire.hosting.javascript/denoappresource.md) -- `handle`
