summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/dts/lib.deno.unstable.d.ts2
-rw-r--r--test_ffi/tests/ffi_types.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 4b43c181b..b9e9b4d2e 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -151,7 +151,7 @@ declare namespace Deno {
type StaticForeignFunctionParameter<T> = T extends "void" ? void
: T extends StaticNativeNumberType ? number
- : T extends "pointer" ? Deno.UnsafePointer | Deno.TypedArray
+ : T extends "pointer" ? Deno.UnsafePointer | Deno.TypedArray | null
: unknown;
/** Infers a foreign function parameter list. */
diff --git a/test_ffi/tests/ffi_types.ts b/test_ffi/tests/ffi_types.ts
index 0066e362c..e10cfb894 100644
--- a/test_ffi/tests/ffi_types.ts
+++ b/test_ffi/tests/ffi_types.ts
@@ -86,7 +86,7 @@ remote.symbols.method14(null);
remote.symbols.method14(0);
// @ts-expect-error: Invalid argument
-remote.symbols.method15(null);
+remote.symbols.method15(0);
remote.symbols.method15(new Uint16Array(1));
remote.symbols.method15({} as Deno.UnsafePointer);