lit / lit/lit.dev

Directive class in generated API docs imported from async-directive instead of directive

Open
#1,146 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
142
Forks
230
PR merge metrics
No merged PRs in 30d

Description

At https://lit.dev/docs/api/custom-directives/#Directive the import of:

`import { Directive } from 'lit/async-directive.js';` could more tersely written as `import { Directive } from 'lit/directive.js';`

Although both are correct. Maybe both should be shown?

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

Open the Directive entry at https://lit.dev/docs/api/custom-directives/#Directive and inspect how the generated API documentation chooses its import example. Compare the documented `lit/async-directive.js` and `lit/directive.js` imports, then update the documentation according to the chosen presentation; done means the Directive entry shows the intended import or both imports clearly.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.