Skip to content

Commit ac92fe5

Browse files
authored
JsDoc: Remove promise from Actor.say (#3535)
The return type of `Actor.say` contains `Promise<any>`. In TypeScript code, with the ESLint rule "@typescript-eslint/no-floating-promises" this causes lint errors for every `I.say` in the tests stating that a promise will not be awaited. Instead, add a comment similar to many other methods (`I.see`, `I.click`, ...) and leave the return type `void`.
1 parent 429c609 commit ac92fe5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/actor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ class Actor {
1616
* add print comment method`
1717
* @param {string} msg
1818
* @param {string} color
19-
* @return {Promise<any> | undefined}
2019
* @inner
20+
*
21+
* ⚠️ returns a promise which is synchronized internally by recorder
2122
*/
2223
say(msg, color = 'cyan') {
2324
return recorder.add(`say ${msg}`, () => {

0 commit comments

Comments
 (0)