Skip to content

Commit

Permalink
fix(fast-element): export missing elements filter helper (#3331)
Browse files Browse the repository at this point in the history
* fix(fast-element): export missing elements filter helper

* doc(fast-element): add api doc update

* fix(fast-element): add public dist tag to elements helper

Co-authored-by: Nicholas Rice <[email protected]>
  • Loading branch information
EisenbergEffect and nicholasrice authored Jun 17, 2020
1 parent fc258fd commit 46de565
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/web-components/fast-element/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ export const DOM: Readonly<{
setBooleanAttribute(element: HTMLElement, attributeName: string, value: boolean): void;
}>;

// @public
export function elements(tagName?: string): (value: Node, index: number, array: Node[]) => boolean;

// @public
export abstract class ElementStyles {
// @internal (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export interface NodeBehaviorBehaviorOptions<T = any> {
}

/**
* Filters an array of nodes to only elements.
* Creates a function that can be used to filter a Node array, selecting only elements.
* @param tagName - An optional tag name to restrict the filter to.
* @public
*/
export function elements(tagName?: string) {
if (tagName) {
Expand Down
1 change: 1 addition & 0 deletions packages/web-components/fast-element/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ export * from "./directives/when";
export * from "./directives/repeat";
export * from "./directives/slotted";
export * from "./directives/children";
export { elements } from "./directives/node-observation";

0 comments on commit 46de565

Please sign in to comment.