You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, documentation for functions that return either one type or another is not being generated properly. This feature request aims at overcoming this.
I have a custom validator returning either a literal type or null.
The documentation generated by compodoc prints out Type: literal type| in this case.
It should generate either Type: literal type or null (with CSS classes for code used) or Type: literal type | null.
Example generating Type: literal type|:
/**
* Validates whether passwords match and returns the result of the validation.
*
* @param {AbstractControl} a The form control to be validated.
* @param {string} pwControl The name of the control containing the password to match with the password confirmation.
* @param {string} pwConfirmControl The name of the control containing the password confirmation to match with the password.
* @returns {{passwordMismatch:boolean}|null} `passwordMismatch` set to true in case of mismatch in password; `null` in case of matching passwords.
*/
pwMatchValidatorNew(a: AbstractControl, pwControl: string, pwConfirmControl: string): { passwordMismatch: boolean } |null {
return (a.get(pwControl).value !== a.get(pwConfirmControl).value &&
a.get(pwControl).dirty === true && a.get(pwConfirmControl).dirty === true)
? { 'passwordMismatch': true } : null;
};
Kindly note that I am not sure I am using the literal type n the right hand side of the function statement properly myself.
The text was updated successfully, but these errors were encountered:
@vogloblinsky I confirm b7d3406 (using https://github.com/compodoc/compodoc#develop as of today, now) to work as expected. You are setting high standards here, Vincent!
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.
lockbot
locked as resolved and limited conversation to collaborators
Oct 1, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Overview of the issue
Currently, documentation for functions that return either one type or another is not being generated properly. This feature request aims at overcoming this.
Operating System, Node.js, npm, compodoc version(s)
Win10, Node 8.1.3, yarn 0.24.6, compodoc 1.0.0-beta.14
Compodoc installed globally or locally ?
locally
Motivation or Use Case
I have a custom validator returning either a literal type or null.
The documentation generated by
compodoc
prints outType: literal type|
in this case.It should generate either
Type: literal type or null
(with CSS classes for code used) orType: literal type | null
.Example generating
Type: literal type|
:Kindly note that I am not sure I am using the literal type n the right hand side of the function statement properly myself.
The text was updated successfully, but these errors were encountered: