-
-
Notifications
You must be signed in to change notification settings - Fork 758
Closed
Description
In PR #845, a question came up about the parsing of boolean declaration options.
typedoc/src/lib/utils/options/declaration.ts
Lines 80 to 82 in 7799a89
| case ParameterType.Boolean: | |
| value = (typeof value === void 0 ? true : !!value); | |
| break; |
The original code was written to return true if the option is undefined and the truthy value of the option otherwise. It was noted by @Gerrit0 that typeof will always return a string, therefore the typeof check will always return false and the expression should be simplified to value = !!value;.
Since there is likely a bug in this code, it should be thoroughly reviewed and corrected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels