lit.dev icon indicating copy to clipboard operation
lit.dev copied to clipboard

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

Open AndrewJakubowicz opened this issue 2 years ago • 1 comments
trafficstars

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?

AndrewJakubowicz avatar Jul 05 '23 23:07 AndrewJakubowicz

All the lit/directive.js exports on that page are showing lit/async-directive.js since I assume typedoc found it from that file first. Ideally, I think we could show both import sources, with the exception of Directive which should only show lit/directive.js. No idea if that's even feasible though. I think preferring lit/directive.js as their original source works fine if that's easier to do.

augustjk avatar Jul 05 '23 23:07 augustjk