Skip to content

Commit

Permalink
feat(core/dom): update type define of selector
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodong2008 committed Jul 14, 2024
1 parent d7163e4 commit 49bb1bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/dom/selector.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ElementList } from "./def";
import type { FastjsDom } from "./dom-types";
import type { FastjsDomList } from "./dom-list-types";
import _dev from "../dev";
Expand All @@ -9,7 +10,7 @@ function selector<
T extends FastjsDom | FastjsDomList | null = FastjsDom | FastjsDomList | null
>(
target: string = "body",
parent: Document | HTMLElement | HTMLElement[] = document
parent: Document | ElementList | ElementList[] = document
): T {
const result = _selector(target, parent);
if (Array.isArray(result))
Expand Down

0 comments on commit 49bb1bb

Please sign in to comment.