# await-thenable

Rule `typescript/await-thenable`. Disallow awaiting a value that is not a Thenable

- Source: typescript
- Technologies: TypeScript
- Kind: correctness
- Needs type information: yes
- Autofix: yes, in at least one linter
- Reach: 97.4M weekly downloads of presets that enable it
- Trend: +83.0% last quarter
- Rank: #188 by reach, #402 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/await-thenable` | no | suggestion | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/await-thenable) |
| Oxlint | `typescript/await-thenable` | yes | safe | plugin `typescript`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/await-thenable.html) |

## Code examples

### Incorrect: the rule reports this

```ts
await 'value';

const createValue = () => 'value';
await createValue();
```

```ts
async function syncIterable() {
  const arrayOfValues = [1, 2, 3];
  for await (const value of arrayOfValues) {
    console.log(value);
  }
}

async function syncIterableOfPromises() {
  const arrayOfPromises = [
    Promise.resolve(1),
    Promise.resolve(2),
    Promise.resolve(3),
  ];
  for await (const promisedValue of arrayOfPromises) {
    console.log(promisedValue);
  }
}
```

```ts
function makeSyncDisposable(): Disposable {
  return {
    [Symbol.dispose](): void {
      // Dispose of the resource
    },
  };
}

async function shouldNotAwait() {
  await using resource = makeSyncDisposable();
}
```

### Correct: the rule accepts this

```ts
await Promise.resolve('value');

const createValue = async () => 'value';
await createValue();
```

```ts
async function syncIterable() {
  const arrayOfValues = [1, 2, 3];
  for (const value of arrayOfValues) {
    console.log(value);
  }
}

async function syncIterableOfPromises() {
  const arrayOfPromises = [
    Promise.resolve(1),
    Promise.resolve(2),
    Promise.resolve(3),
  ];
  for (const promisedValue of await Promise.all(arrayOfPromises)) {
    console.log(promisedValue);
  }
}

async function validUseOfForAwaitOnAsyncIterable() {
  async function* yieldThingsAsynchronously() {
    yield 1;
    await new Promise(resolve => setTimeout(resolve, 1000));
    yield 2;
  }

  for await (const promisedValue of yieldThingsAsynchronously()) {
    console.log(promisedValue);
  }
}
```

```ts
function makeSyncDisposable(): Disposable {
  return {
    [Symbol.dispose](): void {
      // Dispose of the resource
    },
  };
}

async function shouldNotAwait() {
  using resource = makeSyncDisposable();
}

function makeAsyncDisposable(): AsyncDisposable {
  return {
    async [Symbol.asyncDispose](): Promise<void> {
      // Dispose of the resource asynchronously
    },
  };
}

async function shouldAwait() {
  await using resource = makeAsyncDisposable();
}
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/await-thenable": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/await-thenable": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Oxlint default](https://lintradar.dev/presets/oxlint-default.md) | Oxlint | `oxlint` | 111 | 50.8M | +183.6% |
| [typescript-eslint strict type-checked](https://lintradar.dev/presets/typescript-eslint-strict-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 75 | 175.9M | +29.5% |
| [typescript-eslint recommended type-checked](https://lintradar.dev/presets/typescript-eslint-recommended-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 47 | 175.9M | +29.5% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [typescript/no-base-to-string](https://lintradar.dev/rules/typescript/no-base-to-string.md): Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified
- [typescript/restrict-template-expressions](https://lintradar.dev/rules/typescript/restrict-template-expressions.md): Enforce template literal expressions to be of `string` type
- [typescript/no-for-in-array](https://lintradar.dev/rules/typescript/no-for-in-array.md): Disallow iterating over an array with a for-in loop
- [typescript/no-meaningless-void-operator](https://lintradar.dev/rules/typescript/no-meaningless-void-operator.md): Disallow the `void` operator except when used to discard a value
- [typescript/no-misused-spread](https://lintradar.dev/rules/typescript/no-misused-spread.md): Disallow using the spread operator when it might cause unexpected behavior
- [typescript/no-implied-eval](https://lintradar.dev/rules/typescript/no-implied-eval.md): Disallow the use of `eval()`-like functions

---

Web page: https://lintradar.dev/rules/typescript/await-thenable. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
