Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Adicionar documentação a nível de código #167

Open
jhonatantft opened this issue May 4, 2020 · 0 comments
Open

[docs] Adicionar documentação a nível de código #167

jhonatantft opened this issue May 4, 2020 · 0 comments

Comments

@jhonatantft
Copy link

Documentar o código é indispensável para qualquer projeto com muitas pessoas trabalhando e principalmente em projetos open source, pois além de facilitar as manutenções (PR's), diminui o tempo de aprendizado.

Sugiro a utilização do padrão JSDoc, segue exemplo:

/**
 * Represents a book.
 * @constructor
 * @param {string} title - The title of the book.
 * @param {string} author - The author of the book.
 */
function Book(title, author) {
}

/**
 * Returns the sum of a and b
 * @param {number} a
 * @param {number} b
 * @returns {Promise} Promise object represents the sum of a and b
 */
function sumAsync(a, b) {
    return new Promise(function(resolve, reject) {
        resolve(a + b);
    });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant