Skip to content

Commit 363fff4

Browse files
authored
[raphael] Fix for TS 6.0 (DefinitelyTyped#74011)
1 parent 9f06584 commit 363fff4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/raphael/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ export type RaphaelPaperPluginRegistry<
453453
[P in keyof T]: RaphaelPaperPluginMethodOrRegistry<TTechnology, T[P]>;
454454
};
455455

456-
type RaphaelPaperPluginMethodOrRegistry<TTechnology extends RaphaelTechnology, T> = T extends (...args: any) => any
457-
? RaphaelPaperPluginMethod<TTechnology, Parameters<T>, ReturnType<T>>
456+
type RaphaelPaperPluginMethodOrRegistry<TTechnology extends RaphaelTechnology, T> = T extends readonly any[] ? {}
457+
: T extends (...args: any) => any ? RaphaelPaperPluginMethod<TTechnology, Parameters<T>, ReturnType<T>>
458458
: RaphaelPaperPluginRegistry<TTechnology, T>;
459459
/**
460460
* You can add your own method to elements. This is useful when you want to hack default functionality or want

0 commit comments

Comments
 (0)