JavaScript Documentation Following Google Coding Style Guide - JSDocs

preview_player
Показать описание
JSDoc is a markup language used to annotate JavaScript source code files. Thanks to the JSDoc comments, developers can add documentation to the code they are creating. This is required as JavaScript is a language that doesn’t support data typing. In today’s video we are going to see how Google approaches the documentation of JavaScript code.

The general documentation format looks like this. Developers use it to describe functionalities of their code as well as the format of the data they are working with. Comments can be written in block or as a single-line. It is important that comments are well-formed, that is because many tools extract metadata from JSDocs in order to perform code validation, optimization or automatic documentation files.

JSDoc serves multiple purposes in JavaScript. In addition to being used to generate documentation it is also used as a control tooling. Google developed the Closure Compiler, a tool for making JavaScript download and run faster. It parses your JavaScript, analyzes it and removes dead code. This makes it a great compiler for improving the JavaScript files used in production.

#javascript #coding #google #jsodcs
Рекомендации по теме