Open Shinigami92 opened 5 years ago
Wanted to implement this, realized that while the guide section of the documentation does not provide clear information about default values, the api section does.
Having a second source of truth to the official documentation is likely to cause more confusion than be convenient down the line. (outdated JSDoc comments are easily overlooked)
Opinions?
@ww7w could the JSDoc be used to generate the documentation?
@kinow its definitely possible, but having to write the API documentation inside of type definition files introduces its own separation of concerns issues.
Also, JSDoc doesn't have one unified spec, which makes it hardly suitable for anything more than short comments like the one in the example.
What problem does this feature solve?
This will improve the developer experience when using Vue in editors such as VSCode.
Currently, the developer must look up the default value in the documentation. And even there it is not clear, without trying it.
What does the proposed API look like?
One example:
https://github.com/vuejs/vue/blob/b7c2d9366cf731a1551286b8ac712e6e0905070e/types/options.d.ts#L155
This line could get a JSDoc like:
Example Result