less / less/less-docs

'Usage in code' section does not provide full API reference of the less.render() method.

Open
#454 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api documentation high priority
Dominant language
Less
Stars
680
Forks
442
PR merge metrics
No merged PRs in 30d

Description

This is a real life scenario: I am trying to fix an issue where the callback to less.render() throws, and as a result I get unhandled rejection. I went to the Less documentation site hoping that I would find info on how to pass a rejection callback to less.render(). My hope was in vain. Do I have to ensure that the render() callback doesn't let any exceptions out? Do I pass the rejection callback as 4th argument? Does less.render() return a promise?

This should be documented somewhere, preferably in the 'Usage in code' section.

It is quite possible that less.render() does everything synchronously and the unhandled rejection happens entirely within my callback. Still, if arguments and return value were thoroughly documented, I would know this by now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the documentation site's “Usage in code” section and locate the less.render() entry point. Check the existing API description against the questions about callback arguments, rejection handling, and return values. Done means the section documents the method's arguments and return behavior clearly enough to resolve those questions.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.