gruntjs / gruntjs/grunt

Different return types for registerTask and registerMultiTask: should be the same?

Open
#1,262 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

`registerTask` returns `grunt.task`, presumably to enable chaining. `registerMultiTask`, on the other hand, returns `undefined`. Is this intended behavior? It seems to me like they both should return `grunt.task`.

I ask because I'm updating grunt's TypeScript type definition and would like to have the correct type signature for both of those functions.

Contributor guide

Open the contributing guide

Research direction

Compare the implementations of registerTask and registerMultiTask, then inspect the Grunt TypeScript type definition mentioned in the issue. Determine whether their return behavior is intended and document the matching signature only after confirming the runtime behavior; done means the API behavior and type definition agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.