Skip to content

Commit 2754be4

Browse files
piotr-olesxiaozs
andauthored
fix: cast constructor arguments to pointers (#20)
Co-authored-by: xiaozs <[email protected]>
1 parent c6cb47a commit 2754be4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/types/pointer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export type PointerCastObject<
3737
export type PointerCastInstance<
3838
T extends new (...args: any) => any,
3939
E = NonPointerTypes
40-
> = T extends new (...args: any) => infer R
41-
? T & {
40+
> = T extends new (...args: infer A) => infer R
41+
? (new (...args: PointerCastArray<A, E>) => PointerCastObject<R, E>) & {
4242
wrap(ptr: Pointer<PointerCastObject<R, E>>): PointerCastObject<R, E>;
4343
}
4444
: never;

0 commit comments

Comments
 (0)