We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
typeParameters
1 parent 98990e8 commit d417d05Copy full SHA for d417d05
src/utils/hasReturnValue.js
@@ -19,9 +19,8 @@ const isNewPromiseExpression = (node) => {
19
* @returns {boolean}
20
*/
21
const isVoidPromise = (node) => {
22
- return /** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */ (
23
- node
24
- )?.typeParameters?.params?.[0]?.type === 'TSVoidKeyword';
+ return /** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */ (node)?.typeArguments?.params?.[0]?.type === 'TSVoidKeyword'
+ || /** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */ (node)?.typeParameters?.params?.[0]?.type === 'TSVoidKeyword';
25
};
26
27
const undefinedKeywords = new Set([
0 commit comments