Skip to content

Commit

Permalink
chore: mention TypeScript issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Mar 1, 2022
1 parent 7889255 commit 0425fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/rules/no-misused-promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ function voidFunctionParams(
const voidReturnIndices = new Set<number>();
const type = checker.getTypeAtLocation(node.expression);

// TODO(file bug on TypeScript): checker.getResolvedSignature prefers a () => void over a () => Promise<void>
// See https://github.com/typescript-eslint/typescript-eslint/issues/4609 (todo: comment in PR)
// We can't use checker.getResolvedSignature because it prefers an early '() => void' over a later '() => Promise<void>'
// See https://github.com/microsoft/TypeScript/issues/48077

for (const subType of tsutils.unionTypeParts(type)) {
// Standard function calls and `new` have two different types of signatures
Expand Down

0 comments on commit 0425fe8

Please sign in to comment.