RFC: Documenting the default value for a parameter
See original GitHub issueIn issue https://github.com/Microsoft/tsdoc/issues/27#issuecomment-473178150 , @sindresorhus asked:
How about documenting default function parameters? What will that look like?
I’ve opened a new issue since I think it’s a separate topic from the @defaultValue
tag.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:10
Top Results From Across the Web
set multiple default values to RFC - SAP Community
Hemanth,. You can have default values for every single input parameter in your RFC. But for one parameter, you can have only one...
Read more >With-defaults Capability for NETCONF RFC 6243
Non-configuration data nodes containing the schema default value MUST NOT be reported. ... Retrieval of Default Data This document defines a new parameter, ......
Read more >RFC 2215: General Characterization Parameters for ...
In practice, it may be appropriate for vendors to choose and document a tolerance ... Default and Service-Specific Values for General Parameters General ......
Read more >Measurement Protocol Parameter Reference
This document lists all of the parameters for the Measurement Protocol. ... Parameter, Value Type, Default Value, Max Length, Supported Hit Types.
Read more >PHP RFC: Named Arguments
Named arguments are passed by prefixing the value with the parameter name followed by a colon: callAFunction(paramName: $value);. It is possible ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any movement on this? I am new to Typescript and I found it quite odd that I couldn’t put the default values in my
.d.ts
files. I’d really like for the users of my code to know the default values for these parameters (as we only ship .d.ts files) but there doesn’t seem to be a way to do that.I strongly agree with @JakeShirley and come across this often. Regarding @octogonz’s comment:
I use TSDoc so that I don’t have to read soure code to know what a function does.
For example, I really think the hover-info for a function like this should include the important fact that the default is 0.5. Or I should at least have a formal way to add that information, no? This added information is completely invisible (and seemingly useless) in my editor:
Sorry if I’m just missing something here 😅