Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.async

Async Promise executor function

The executor passed to `new Promise` is declared `async`.

#Metadata

Rule ID
ts.correctness.async-promise-executor
Severity
medium
Confidence
0.92
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
file
Tags
async, correctness, crq-cor-020, public-directory-parity, rules-catalog

#Why it matters

Async executors defer errors and can swallow rejections; prefer a synchronous executor that calls `resolve`/`reject`.

#Remediation

Remove `async` from the executor and use `resolve`/`reject`, or wrap the async work without making the executor itself async.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.async-promise-executor.rule.yaml.