-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
JSDoc applied to methods tend to age. Typically method parameters are added / removed / changed but their documentation remain unchanged.
Typescript compiler should check the @param names and should write an error, if they are not found in the method signature. Maybe this check should be optional, by a compiler flag.
TypeScript Version: (2.0.3)
Code
class TestValidateJSDocParams {
/** Calculate the sum of the given numbers
* @param x first summand
* @param y second summand
* @param z third summand
*/
public sum (a: number, b: number) : number {
return a + b;
}
}
Expected behavior:
Should log an tsc compiler error for unknown methods parameters: x, y, z
Actual behavior:
Compiles without an error.
benlesh, a-tarasyuk, JoshuaKGoldberg and jbress
Metadata
Metadata
Assignees
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue