Skip to content

Files

Latest commit

 

History

History
19 lines (13 loc) · 464 Bytes

valid-params.md

File metadata and controls

19 lines (13 loc) · 464 Bytes

Pattern: Invalid number of arguments in Promise methods

Issue: -

Description

Calling Promise methods with an incorrect number of arguments can lead to unexpected behavior or bugs that are difficult to detect. Each Promise method has a specific number of expected parameters that should be followed.

Examples

Example of incorrect code:

Promise.resolve(1, 2);

Example of correct code:

Promise.resolve(1);