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

[lit-html] Provide directive exports via async-directive #3003

Merged
merged 7 commits into from Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/curly-cars-peel.md
@@ -0,0 +1,6 @@
---
'lit-html': patch
'lit': patch
---

Lit's `async-directive` now re-exports everything from the `directive` module.
2 changes: 1 addition & 1 deletion packages/lit-html/src/async-directive.ts
Expand Up @@ -121,7 +121,7 @@
import {AttributePart, ChildPart, Disconnectable, Part} from './lit-html.js';
import {isSingleExpression} from './directive-helpers.js';
import {Directive, PartInfo, PartType} from './directive.js';
export {directive} from './directive.js';
export * from './directive.js';

const DEV_MODE = true;

Expand Down
7 changes: 5 additions & 2 deletions packages/lit-html/src/directives/async-replace.ts
Expand Up @@ -5,8 +5,11 @@
*/

import {ChildPart, noChange} from '../lit-html.js';
import {directive, DirectiveParameters} from '../directive.js';
import {AsyncDirective} from '../async-directive.js';
import {
AsyncDirective,
directive,
DirectiveParameters,
} from '../async-directive.js';
import {Pauser, PseudoWeakRef, forAwaitOf} from './private-async-helpers.js';

type Mapper<T> = (v: T, index?: number) => unknown;
Expand Down
3 changes: 1 addition & 2 deletions packages/lit-html/src/directives/until.ts
Expand Up @@ -5,9 +5,8 @@
*/

import {Part, noChange} from '../lit-html.js';
import {directive} from '../directive.js';
import {isPrimitive} from '../directive-helpers.js';
import {AsyncDirective} from '../async-directive.js';
import {directive, AsyncDirective} from '../async-directive.js';
import {Pauser, PseudoWeakRef} from './private-async-helpers.js';

const isPromise = (x: unknown) => {
Expand Down
3 changes: 1 addition & 2 deletions packages/lit-html/src/test/directive-helpers_test.ts
Expand Up @@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
import {html, ChildPart, render, svg} from '../lit-html.js';
import {directive, Directive} from '../directive.js';
import {assert} from '@esm-bundle/chai';
import {stripExpressionComments} from './test-utils/strip-markers.js';
import {
Expand All @@ -18,7 +17,7 @@ import {
TemplateResultType,
} from '../directive-helpers.js';
import {classMap} from '../directives/class-map.js';
import {AsyncDirective} from '../async-directive.js';
import {directive, Directive, AsyncDirective} from '../async-directive.js';

suite('directive-helpers', () => {
let container: HTMLDivElement;
Expand Down