Skip to content

Commit

Permalink
Allow buildAsyncSelector method to receive a Promise (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
elchininet authored Dec 4, 2023
1 parent f933218 commit b7da10b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [2.0.3] - 2023-12-04

- Allow `buildAsyncSelector` method to receive a Promise

## [2.0.2] - 2023-12-04

- `AsyncSelector` has been renamed to `buildAsyncSelector`
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ export function buildAsyncSelector(
asyncParams?: AsyncParams
): AsyncSelectorProxy;
export function buildAsyncSelector(
root: Document | Element | ShadowRoot,
root: Document | Element | ShadowRoot | Promise<Element | NodeListOf<Element> | ShadowRoot>,
asyncParams?: AsyncParams
): AsyncSelectorProxy;
export function buildAsyncSelector (
firstParameter: Document | Element | ShadowRoot | AsyncParams,
firstParameter: Document | Element | ShadowRoot | Promise<Element | NodeListOf<Element> | ShadowRoot> | AsyncParams,
secondParameter?: AsyncParams
): AsyncSelectorProxy {
if (firstParameter instanceof Node) {
Expand Down

0 comments on commit b7da10b

Please sign in to comment.