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
For my API's JSON input parameters, I use a Class instead of an Interface because I can supply default values for fields not supplied by the user.
When using TypeDoc, those default values are not included in the generated documentation.
Currently I can workaround this by pasing the defaults into the jsdoc description. It would be very nice if Typedoc could do this automatically, perhaps using decorators to toggle this (when decorator support is added)
The text was updated successfully, but these errors were encountered:
/** My class can be passed to my API as JSON */
export class MyClass{
/** my argument, default value of 'foo' if not supplied by user */
public arg1:string="foo";
/** default value does not conform to type specified, but use it anyway! */
public arg2: IData=<any>{val1:22,val3:33};
}
/** a complex data type */
public interface IData{
/** numbers are nice */
val1:number;
/** strings are too */
val2:string;
}
Hi Jason, this feature has already been requested, please see #83. With support for decorators default values will become more important as it might be a valuable information about the used decorators.
For my API's JSON input parameters, I use a Class instead of an Interface because I can supply default values for fields not supplied by the user.
When using TypeDoc, those default values are not included in the generated documentation.
Currently I can workaround this by pasing the defaults into the jsdoc description. It would be very nice if Typedoc could do this automatically, perhaps using decorators to toggle this (when decorator support is added)
The text was updated successfully, but these errors were encountered: