Skip to content

Commit

Permalink
fix for TypeScript 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Jul 17, 2024
1 parent a113d09 commit 46cd3d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Fixed for TypeScript 5.5.

## v2.11.2

- Fixed handling `unknown` incorrectly. (Fix [#36](https://github.com/g-plane/typed-query-selector/issues/36))
Expand Down
2 changes: 1 addition & 1 deletion parser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export type ParseSelector<
I extends string,
Fallback extends Element = Element,
> = ParseSelectorToTagNames<I> extends string
? ExpandAnd<ParseSelectorToTagNames<I>, Fallback> extends Element
? ExpandAnd<ParseSelectorToTagNames<I>, Fallback> extends Fallback
? ExpandAnd<ParseSelectorToTagNames<I>, Fallback>
: Fallback
: Fallback
Expand Down
5 changes: 5 additions & 0 deletions parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,8 @@ declare function delegate<
Selector extends string,
TElement extends Element = ParseSelector<Selector, HTMLElement>,
>(selector: Selector): void

declare function fetchDom<
Selector extends string,
TElement extends HTMLElement = ParseSelector<Selector, HTMLElement>,
>(selector: Selector): Promise<TElement | undefined>

0 comments on commit 46cd3d5

Please sign in to comment.