We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6cb47a commit 2754be4Copy full SHA for 2754be4
src/runtime/types/pointer.ts
@@ -37,8 +37,8 @@ export type PointerCastObject<
37
export type PointerCastInstance<
38
T extends new (...args: any) => any,
39
E = NonPointerTypes
40
-> = T extends new (...args: any) => infer R
41
- ? T & {
+> = T extends new (...args: infer A) => infer R
+ ? (new (...args: PointerCastArray<A, E>) => PointerCastObject<R, E>) & {
42
wrap(ptr: Pointer<PointerCastObject<R, E>>): PointerCastObject<R, E>;
43
}
44
: never;
0 commit comments