# DenoAppResource

- Module: [Aspire.Hosting.JavaScript](/reference/api/typescript/aspire.hosting.javascript.md)
- Version: `13.6.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62)

A resource that represents a Deno application.

## Definition

```typescript
interface DenoAppResource
  extends IComputeResource,
    IContainerFilesDestinationResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IResourceWithContainerFiles,
    IResourceWithServiceDiscovery {
  withDenoAllow(
      kind: DenoPermissionKind,
      values: string[]): DenoAppResource;
  withDenoAllowAll(enabled?: boolean): DenoAppResource;
  withDenoConfig(configFile: string): DenoAppResource;
  withDenoDeny(
      kind: DenoPermissionKind,
      values: string[]): DenoAppResource;
  withDenoImportMap(importMapFile: string): DenoAppResource;
  withDenoInspect(
      mode?: DenoInspectMode,
      hostPort?: string): DenoAppResource;
  withDenoLock(lockFile: string): DenoAppResource;
  withDenoNodeModulesDir(mode?: DenoNodeModulesDirMode): DenoAppResource;
  withDenoNoLock(): DenoAppResource;
  withDenoRun(): DenoAppResource;
  withDenoRuntimeArgs(args: string[]): DenoAppResource;
  withDenoScriptArgs(args: string[]): DenoAppResource;
  withDenoServe(): DenoAppResource;
  withDenoTask(taskName: string): DenoAppResource;
  withDenoUnstable(features: string[]): DenoAppResource;
  withDenoWatch(hmr?: boolean): DenoAppResource;
}
```

## Methods

- [withDenoAllow](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoallow.md) -- `method` -- Grants a Deno permission, optionally scoped to the supplied values.
    ```typescript
  withDenoAllow(kind: DenoPermissionKind, values: string[]): DenoAppResource
  ```
- [withDenoAllowAll](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoallowall.md) -- `method` -- Controls the blanket `-A`/`--allow-all` grant.
    ```typescript
  withDenoAllowAll(enabled?: boolean): DenoAppResource
  ```
- [withDenoConfig](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoconfig.md) -- `method` -- Sets `--config <file>` (path to a `deno.json`/`deno.jsonc`).
    ```typescript
  withDenoConfig(configFile: string): DenoAppResource
  ```
- [withDenoDeny](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenodeny.md) -- `method` -- Denies a Deno permission, optionally scoped to the supplied values.
    ```typescript
  withDenoDeny(kind: DenoPermissionKind, values: string[]): DenoAppResource
  ```
- [withDenoImportMap](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoimportmap.md) -- `method` -- Sets `--import-map <file>`.
    ```typescript
  withDenoImportMap(importMapFile: string): DenoAppResource
  ```
- [withDenoInspect](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoinspect.md) -- `method` -- Enables a Deno inspector mode, optionally at `hostPort` (for example `127.0.0.1:9229`).
    ```typescript
  withDenoInspect(mode?: DenoInspectMode, hostPort?: string): DenoAppResource
  ```
- [withDenoLock](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenolock.md) -- `method` -- Sets `--lock <file>`.
    ```typescript
  withDenoLock(lockFile: string): DenoAppResource
  ```
- [withDenoNodeModulesDir](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenonodemodulesdir.md) -- `method` -- Sets `--node-modules-dir`, optionally with a mode emitted as `--node-modules-dir=<mode>`.
    ```typescript
  withDenoNodeModulesDir(mode?: DenoNodeModulesDirMode): DenoAppResource
  ```
- [withDenoNoLock](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenonolock.md) -- `method` -- Sets `--no-lock`, disabling lockfile use.
    ```typescript
  withDenoNoLock(): DenoAppResource
  ```
- [withDenoRun](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenorun.md) -- `method` -- Selects the `deno run <entrypoint>` mode (the default).
    ```typescript
  withDenoRun(): DenoAppResource
  ```
- [withDenoRuntimeArgs](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoruntimeargs.md) -- `method` -- Appends raw runtime arguments injected verbatim BEFORE the entrypoint. This is the escape hatch that gives full parity with `AddExecutable("name", "deno", workdir, args...)` for any flag not covered by a dedicated `WithDeno*` method.
    ```typescript
  withDenoRuntimeArgs(args: string[]): DenoAppResource
  ```
- [withDenoScriptArgs](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoscriptargs.md) -- `method` -- Appends arguments passed to the script AFTER the entrypoint. Deno forwards everything after the entrypoint to the running program.
    ```typescript
  withDenoScriptArgs(args: string[]): DenoAppResource
  ```
- [withDenoServe](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenoserve.md) -- `method` -- Selects the `deno serve <entrypoint>` mode for serving an HTTP entrypoint.
    ```typescript
  withDenoServe(): DenoAppResource
  ```
- [withDenoTask](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenotask.md) -- `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.
    ```typescript
  withDenoTask(taskName: string): DenoAppResource
  ```
- [withDenoUnstable](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenounstable.md) -- `method` -- Adds one or more `--unstable-*` flags. Each feature may be supplied bare (for example `"kv"`, `"worker-options"`, `"sloppy-imports"`) or fully qualified (`"--unstable-kv"`).
    ```typescript
  withDenoUnstable(features: string[]): DenoAppResource
  ```
- [withDenoWatch](/reference/api/typescript/aspire.hosting.javascript/denoappresource/withdenowatch.md) -- `method` -- Enables `--watch` (or `--watch-hmr` when `hmr` is `true`).
    ```typescript
  withDenoWatch(hmr?: boolean): DenoAppResource
  ```
