Skip to content

Commit

Permalink
fixup type
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx committed Oct 11, 2024
1 parent 69e11d8 commit 0800b1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/webidl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ interface WebidlUtil {
*/
Stringify (V: any): string

MakeTypeAssertion <I extends abstract new (...args: any[]) => any>(I: I): (arg: any) => arg is InstanceType<I>
MakeTypeAssertion <I>(I: I): (arg: any) => arg is I
}

interface WebidlConverters {
Expand Down Expand Up @@ -176,7 +176,7 @@ interface WebidlConverters {
[Key: string]: (...args: any[]) => unknown
}

type IsAssertion<T extends abstract new (...args: any[]) => any> = (arg: any) => arg is InstanceType<T>
type IsAssertion<T> = (arg: any) => arg is InstanceType<T>

Check failure on line 179 in types/webidl.d.ts

View workflow job for this annotation

GitHub Actions / Test TypeScript types

Type 'T' does not satisfy the constraint 'abstract new (...args: any) => any'.

interface WebidlIs {
Request: IsAssertion<undici.Request>
Expand Down

0 comments on commit 0800b1a

Please sign in to comment.