Skip to content

Commit

Permalink
fix(types): Fix context types not being updated everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Apr 16, 2021
1 parent eb07112 commit d2b0409
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { CompiledQuery, InternalOptions } from "./types";
export function compile<Node, ElementNode extends Node>(
selector: string | Selector[][],
options: InternalOptions<Node, ElementNode>,
context?: ElementNode[]
context?: Node[] | Node
): CompiledQuery<ElementNode> {
const next = compileUnsafe(selector, options, context);
return ensureIsTag(next, options.adapter);
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function wrapCompile<Selector, Node, ElementNode extends Node>(
func: (
selector: Selector,
options: InternalOptions<Node, ElementNode>,
context?: Node[]
context?: Node[] | Node
) => CompiledQuery<ElementNode>
) {
return function addAdapter(
Expand Down

0 comments on commit d2b0409

Please sign in to comment.