Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness

No Misused Promises

Do not pass async callbacks where sync is expected

#Metadata

Rule ID
ts.correctness.no-misused-promises
Severity
medium
Confidence
0.85
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
block
Tags
correctness, rules-catalog

#Why it matters

Do not pass async callbacks where sync is expected:array iteration methods expect synchronous predicates and should not receive async callbacks.

#Remediation

Do not pass async callbacks where sync is expected:array iteration methods expect synchronous predicates and should not receive async callbacks.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.correctness.no-misused-promises.rule.yaml.